html {
  font-size: 15px;
  min-height: 100%;
  overflow-y: scroll;
}

body {
  min-height: 100vh;
  margin: 0;
  color: #1d2428;
  background: #f6f4ef;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
}

a {
  color: #245b8f;
}

.btn-primary {
  background: #256d5a;
  border-color: #256d5a;
  transition: background-color .12s ease, border-color .12s ease;
}

.btn-primary:hover,
.btn-primary:focus {
  background: #1f5b4c;
  border-color: #18483d;
}

.app-header {
  min-height: 51px;
  background: #fffdfa;
  border-bottom: 1px solid #dfd8cc;
}

.app-nav {
  min-height: 50px;
  display: flex;
  align-items: center;
}

.app-nav-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  width: min(1560px, calc(100% - 32px));
  margin: 0 auto;
  padding: 7px 0;
}

.app-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #256d5a;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.app-nav-brand-logo {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}

.app-nav-brand:hover,
.app-nav-brand:focus {
  color: #256d5a;
}

.app-nav-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  flex: 1;
}

.app-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
}

.app-nav-link {
  display: inline-flex;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #3d494d;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}

.app-nav-link:hover,
.app-nav-link:focus-visible {
  border-color: #a9c8bd;
  background: #e5f0ec;
  color: #1f5b4c;
  outline: 0;
}

.app-nav-link:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 109, 90, .2);
}

.app-nav-link.active {
  border-color: #256d5a;
  background: #256d5a;
  color: #fffdfa;
}

.app-nav-link.active:hover,
.app-nav-link.active:focus-visible {
  border-color: #1f5b4c;
  background: #1f5b4c;
  color: #fffdfa;
}

.app-header .navbar {
  min-height: 50px;
}

.app-header .navbar-nav {
  flex-wrap: nowrap;
}

.navbar-brand {
  color: #1b2b2b;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.nav-link {
  color: #3d494d;
  font-weight: 600;
  white-space: nowrap;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex: 0 0 auto;
  white-space: nowrap;
}

.nav-user {
  color: #697277;
  font-size: .9rem;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #d8cfc2;
  border-radius: 999px;
  background: #fffdfa;
  color: #25363b;
  cursor: pointer;
}

.icon-button:hover,
.icon-button.flextip-open {
  border-color: #256d5a;
  color: #256d5a;
}

.notification-button {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #fffdfa;
  border-radius: 999px;
  background: #c9362d;
  color: #fffdfa;
  font-size: .68rem;
  font-weight: 900;
  line-height: 1;
}

.user-menu {
  min-width: 190px;
}

.notification-menu {
  width: min(360px, calc(100vw - 24px));
}

.user-menu-name {
  padding: 7px 10px 10px;
  border-bottom: 1px solid #eadfd2;
  color: #657074;
  font-size: .82rem;
  font-weight: 700;
}

.user-menu form {
  margin: 0;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #25363b;
  font: inherit;
  font-weight: 750;
  text-align: left;
  text-decoration: none;
}

.user-menu-item:hover {
  background: #f5f1e9;
  color: #1f5b4c;
}

.notification-item {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 6px;
  color: #25363b;
  text-decoration: none;
}

.notification-item:hover {
  background: #f5f1e9;
}

.notification-item strong {
  color: #223033;
  font-size: .92rem;
}

.notification-item span {
  color: #657074;
  font-size: .84rem;
  line-height: 1.35;
}

.notification-item form {
  margin: 4px 0 0;
}

.app-main {
  flex: 1 0 auto;
  width: min(1560px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.app-footer {
  flex-shrink: 0;
  border-top: 1px solid #dfd8cc;
  background: #fffdfa;
}

.app-footer-inner {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(150px, 1fr));
  gap: 32px;
  width: min(1560px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 26px;
}

.app-footer-brand {
  display: grid;
  gap: 10px;
  max-width: 420px;
}

.app-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  color: #256d5a;
  font-weight: 850;
  text-decoration: none;
}

.app-footer-logo img {
  display: block;
  width: 34px;
  height: 34px;
}

.app-footer-logo:hover,
.app-footer-logo:focus {
  color: #1f5b4c;
}

.app-footer-brand p {
  margin: 0;
  color: #657074;
  line-height: 1.6;
}

.app-footer-section {
  display: grid;
  gap: 8px;
  align-content: start;
}

.app-footer-section h2 {
  margin: 0 0 3px;
  color: #223033;
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.app-footer-section a {
  color: #526065;
  font-weight: 650;
  text-decoration: none;
}

.app-footer-section a:hover,
.app-footer-section a:focus {
  color: #1f5b4c;
  text-decoration: underline;
  text-underline-offset: .18em;
}

.app-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(1560px, calc(100% - 32px));
  margin: 0 auto;
  padding: 15px 0 20px;
  border-top: 1px solid #eee6db;
  color: #7b8588;
  font-size: .88rem;
}

.legal-shell {
  display: grid;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
}

.legal-hero {
  display: grid;
  gap: 12px;
  padding: 28px 0 4px;
}

.legal-hero h1 {
  max-width: 860px;
  margin: 0;
  color: #182626;
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  font-weight: 850;
  line-height: .95;
}

.legal-hero p {
  max-width: 780px;
  margin: 0;
  color: #566368;
  font-size: 1.1rem;
  line-height: 1.7;
}

.legal-updated {
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid #cfdcd6;
  border-radius: 4px;
  background: #eef5f1;
  color: #1f5b4c;
  font-size: .82rem;
  font-weight: 800;
}

.legal-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.legal-summary,
.legal-card,
.support-card {
  border: 1px solid #ddd4c7;
  border-radius: 8px;
  background: #fffdfa;
  box-shadow: 0 18px 40px rgba(46, 38, 27, .08);
}

.legal-summary {
  position: sticky;
  top: 72px;
  display: grid;
  gap: 12px;
  padding: 20px;
}

.legal-summary h2,
.legal-card h2,
.support-card h2 {
  margin: 0;
  color: #223033;
  font-size: 1.08rem;
  font-weight: 850;
}

.legal-summary p {
  margin: 0;
  padding-left: 12px;
  border-left: 4px solid #256d5a;
  color: #566368;
  line-height: 1.55;
}

.legal-card {
  display: grid;
  gap: 0;
  padding: 6px 24px;
}

.legal-card section {
  display: grid;
  gap: 10px;
  padding: 20px 0;
  border-top: 1px solid #eee6db;
}

.legal-card section:first-child {
  border-top: 0;
}

.legal-card p,
.support-card p {
  margin: 0;
  color: #566368;
  line-height: 1.68;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.support-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 22px;
}

.support-card-primary {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.support-card-primary h2,
.support-card-primary p,
.support-card-primary .support-note {
  grid-column: 1;
}

.support-email {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #256d5a;
  border-radius: 6px;
  background: #256d5a;
  color: #fffdfa;
  font-weight: 850;
  text-decoration: none;
}

.support-email:hover,
.support-email:focus {
  border-color: #1f5b4c;
  background: #1f5b4c;
  color: #fffdfa;
}

.support-note {
  font-size: .92rem;
}

.hero-shell,
.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 44px;
  align-items: center;
  min-height: calc(100vh - 116px);
}

.hero-shell h1,
.auth-shell h1,
.page-header h1,
.workspace-header h1 {
  margin: 0;
  color: #182626;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  font-weight: 850;
  line-height: .95;
  letter-spacing: 0;
}

.hero-copy,
.auth-copy p,
.workspace-header p {
  max-width: 680px;
  margin-top: 1.2rem;
  color: #566368;
  font-size: 1.12rem;
  line-height: 1.7;
}

.hero-title-accent {
  display: block;
  color: #8f3e2f;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 700;
  line-height: .88;
}

.hero-title > span {
  display: block;
}

.hero-title-tools {
  display: flex !important;
  align-items: center;
  gap: .16em;
  white-space: nowrap;
}

.hero-title-tools img {
  display: block;
  width: .82em;
  height: .82em;
  flex: 0 0 .82em;
}

.eyebrow,
.preview-kicker {
  margin: 0 0 .8rem;
  color: #8f3e2f;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow .role-badge {
  text-transform: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 2rem;
}

.hero-benefits {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin-top: 1.6rem;
}

.hero-benefits div {
  display: grid;
  gap: 3px;
  padding-left: 14px;
  border-left: 4px solid #256d5a;
}

.hero-benefits strong {
  color: #223033;
  font-size: 1rem;
  font-weight: 850;
}

.hero-benefits span {
  color: #566368;
  font-size: .96rem;
  line-height: 1.55;
}

.hero-preview-panel-document,
.auth-card,
.create-panel,
.inline-editor,
.block-card,
.matrix-panel,
.readable-preview,
.empty-state {
  border: 1px solid #ddd4c7;
  border-radius: 8px;
  background: #fffdfa;
  box-shadow: 0 18px 40px rgba(46, 38, 27, .08);
}

.hero-panel {
  display: grid;
  gap: 12px;
}

.hero-preview-panel {
  min-width: 0;
}

.hero-preview-panel-document {
  position: relative;
  padding: 20px;
}

.hero-preview-panel-agent {
  display: flex;
  justify-content: flex-start;
  padding: 0;
}

.preview-document {
  padding: 26px;
  border-radius: 6px;
  background: #243238;
  color: #f8f2e7;
}

.preview-document .preview-kicker {
  color: #f2b57e;
}

.agent-preview {
  display: block;
  height: auto;
  object-fit: contain;
}

.agent-preview-sidekick {
  position: absolute;
  top: -42px;
  right: 28px;
  z-index: 1;
  width: 118px;
  filter: drop-shadow(0 16px 22px rgba(46, 38, 27, .16));
  pointer-events: none;
}

.agent-preview-stage {
  display: flex;
  align-items: center;
  gap: 0;
  justify-content: flex-start;
  margin: -10px 0 0 -64px;
}

.agent-preview-message {
  max-width: none;
  color: #256d5a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1.08;
  white-space: nowrap;
  transform: translate(56px, 22px);
  z-index: 1;
}

.agent-preview-large {
  width: min(100%, 340px);
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .18));
}

.preview-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.2rem;
}

.preview-document h2 {
  margin: 0;
  font-weight: 800;
  line-height: 1;
}

.preview-title-separator {
  color: rgba(248, 242, 231, .58);
  font-weight: 800;
  line-height: 1;
  transform: translateY(3px);
}

.preview-title .role-badge {
  display: inline-flex;
  align-items: center;
  transform: translateY(3px);
}

.rule-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.rule-row.compact {
  padding-top: 8px;
}

.rule-row span {
  color: #f2b57e;
}

.hero-panel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 38px;
  padding: 8px 14px;
  margin-top: 18px;
  border: 1px solid rgba(248, 242, 231, .7);
  border-radius: 6px;
  background: #f8f2e7;
  color: #223033;
  font-weight: 800;
  text-decoration: none;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}

.hero-panel-link:hover,
.hero-panel-link:focus {
  border-color: #f2b57e;
  background: #f2b57e;
  color: #223033;
}

.other-workspaces {
  display: grid;
  gap: 6px;
  padding: 12px 0 0;
}

.other-workspace-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #eeeeec;
  border-radius: 6px;
  background: #f7f7f7;
  color: #26363a;
  font-weight: 750;
  text-decoration: none;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}

.other-workspace-link:hover,
.other-workspace-link:focus {
  border-color: #d8cfc2;
  background: #f5f1e9;
  color: #1f5b4c;
}

.other-workspace-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-card,
.create-panel {
  padding: 24px;
}

.auth-switch {
  margin: 1rem 0 0;
  color: #697277;
  text-align: center;
}

.required-marker {
  color: #697277;
  font-weight: 850;
}

.required-field:has(.input-validation-error) .required-marker,
.required-field:has(.field-validation-error) .required-marker {
  color: #dc3545;
}

.field-validation-error {
  display: block;
  margin-top: 6px;
  color: #dc3545;
  font-size: 0.9rem;
}

.page-header,
.workspace-header {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: flex-end;
  margin-bottom: 22px;
}

.access-grid-container {
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(0, 620px);
  gap: 18px;
}

.access-header-row {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.access-validation-row {
  grid-column: 1 / -1;
}

.page-header h1,
.workspace-header h1 {
  font-size: clamp(2rem, 4vw, 4rem);
}

.workspace-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.workspace-mode-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: .8rem;
}

.workspace-mode-row .eyebrow {
  margin: 0;
}

.access-mode-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.workspace-title-row h1 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.workspace-action-button {
  flex: 0 0 auto;
  margin-top: .35rem;
}

.workspace-actions-menu {
  min-width: 220px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 1rem;
  color: #697277;
  text-decoration: none;
}

.back-link-arrow {
  flex: 0 0 auto;
  color: #25363b;
  font-size: .95rem;
  line-height: 1;
}

.back-link:hover,
.back-link:focus {
  color: #1f5b4c;
}

.workspace-meta,
.workspace-stats,
.status-pill {
  display: inline-flex;
  gap: .6rem;
  align-items: center;
  color: #697277;
  font-size: .88rem;
}

.workspace-header > .workspace-meta {
  margin-right: 10px;
  transform: translateY(2px);
}

.template-detail-header {
  position: relative;
}

.template-detail-header > *:not(.template-header-stamp) {
  position: relative;
  z-index: 1;
}

.template-header-stamp {
  position: absolute;
  right: clamp(220px, 20vw, 390px);
  top: 54px;
  z-index: 0;
  padding: .1em .28em .12em;
  transform: rotate(-9deg);
  border-radius: 7px;
  color: rgba(143, 58, 43, .16);
  font-size: clamp(3rem, 5vw, 5.2rem);
  font-weight: 760;
  letter-spacing: .12em;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
  isolation: isolate;
}

.template-header-stamp span {
  position: relative;
  z-index: 2;
  display: block;
  text-shadow:
    1px 0 rgba(143, 58, 43, .045),
    -1px 0 rgba(143, 58, 43, .035),
    0 1px rgba(143, 58, 43, .04);
}

.template-header-stamp span::before {
  content: "";
  position: absolute;
  inset: -.17em -.18em -.14em -.16em;
  z-index: 1;
  border: 1px solid rgba(143, 58, 43, .075);
  border-radius: 5px;
  pointer-events: none;
}

.template-header-stamp::before,
.template-header-stamp::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 7px;
  pointer-events: none;
}

.template-header-stamp::before {
  z-index: 1;
  border: 1px solid rgba(143, 58, 43, .14);
  transform: skewX(-1deg);
}

.template-header-stamp::after {
  z-index: 3;
  inset: -4px;
  background:
    linear-gradient(102deg, transparent 0 8%, rgba(246, 244, 239, .92) 8.5% 9.2%, transparent 9.7% 100%),
    linear-gradient(176deg, transparent 0 18%, rgba(246, 244, 239, .75) 18.3% 19.1%, transparent 19.7% 100%),
    radial-gradient(ellipse at 16% 36%, rgba(246, 244, 239, .92) 0 2.8%, transparent 3.2%),
    radial-gradient(ellipse at 31% 63%, rgba(246, 244, 239, .82) 0 2.4%, transparent 2.9%),
    radial-gradient(ellipse at 48% 28%, rgba(246, 244, 239, .78) 0 1.8%, transparent 2.4%),
    radial-gradient(ellipse at 62% 72%, rgba(246, 244, 239, .85) 0 2.5%, transparent 3%),
    radial-gradient(ellipse at 78% 42%, rgba(246, 244, 239, .78) 0 2.2%, transparent 2.8%),
    radial-gradient(ellipse at 91% 68%, rgba(246, 244, 239, .86) 0 1.9%, transparent 2.5%);
  opacity: .78;
  mix-blend-mode: normal;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
}

.workspace-start-options,
.workspace-template-picker,
.workspace-template-options {
  display: grid;
  gap: .75rem;
}

.workspace-start-help {
  margin: 0;
  color: #647174;
  font-size: .9rem;
  line-height: 1.35;
}

.workspace-template-options {
  margin-top: .75rem;
}

.workspace-template-option-group {
  padding: .75rem;
  border: 1px solid #dfd8cc;
  border-radius: 8px;
}

.workspace-template-option-group h3 {
  margin: 0 0 .5rem;
  font-size: .95rem;
}

.template-editor-panel {
  margin-bottom: 18px;
}

.template-editor-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(420px, .9fr);
  gap: 18px;
  align-items: start;
}

.template-editor-grid > section {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.template-editor-grid > section > .section-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  padding-inline: 10px;
}

.template-editor-grid > section > .section-heading > span:not(.section-heading-title):not(.section-heading-actions) {
  min-width: 0;
  color: #647174;
  font-size: .94rem;
}

.template-target-list,
.template-prompt-list {
  display: grid;
  gap: 12px;
}

.template-target-panel {
  padding: 14px;
}

.template-target-panel summary {
  cursor: pointer;
  font-weight: 700;
}

.template-assignment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.template-assignment-grid h3 {
  flex-basis: 100%;
  margin: 0;
  font-size: .95rem;
}

.template-prompts-heading {
  margin-top: 24px;
}

.template-editor-content {
  margin: 12px 0 0;
  white-space: pre-wrap;
}

.promote-template-success-dialog.flexmodal .flexmodal-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.template-success-message {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  text-align: center;
}

.template-success-message p {
  margin: 0;
}

.create-workspace-start-dialog.flexmodal .flexmodal-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.create-workspace-start-dialog.flexmodal .create-workspace-start-layout {
  flex: 1 1 auto;
  min-height: 0;
}

.flexmodal-intro {
  margin: 0 0 18px;
  color: #657176;
  font-size: .92rem;
}

.create-workspace-start-layout {
  display: grid;
  grid-template-columns: minmax(190px, 220px) minmax(0, 1fr);
  gap: 18px;
  min-height: 0;
}

.create-workspace-start-tabs {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-right: 12px;
  border-right: 1px solid #e1d8ca;
}

.create-workspace-start-tab {
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #526065;
  cursor: pointer;
  font-weight: 800;
  text-align: left;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease;
}

.create-workspace-start-tab:hover,
.create-workspace-start-tab:focus-visible {
  border-color: #c9beae;
  background: #f6f0e8;
  color: #1f5b4c;
  outline: 0;
}

.create-workspace-start-tab.active {
  border-color: #d8cfc2;
  background: #fffdfa;
  color: #223033;
  box-shadow: inset 3px 0 0 #256d5a;
}

.create-workspace-start-panels,
.create-workspace-start-panel {
  min-width: 0;
  min-height: 0;
}

.create-workspace-start-panel.active {
  display: block;
}

.create-workspace-empty-copy {
  display: grid;
  align-content: center;
  min-height: 240px;
  max-width: 560px;
}

.create-workspace-empty-copy h4 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.create-workspace-empty-copy p {
  margin: 0;
  color: #647174;
}

.template-details-form {
  display: grid;
  gap: 14px;
}

.workspace-template-option-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  margin: 0;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease;
}

.workspace-template-option-item:hover,
.workspace-template-option-item:focus-within {
  border-color: #d8cfc2;
  background: #f6f0e8;
}

.workspace-template-option-item .form-check-input {
  margin: 0;
}

.prompt-empty-state h2:only-child {
  margin-bottom: 0;
  color: #697277;
  font-size: 1.1rem;
  font-weight: 600;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 520px));
  gap: 18px;
  align-items: start;
}

.access-grid {
  grid-template-columns: minmax(320px, 460px) minmax(0, 620px);
}

.access-pending-panel {
  grid-column: 1 / -1;
}

.settings-panel {
  padding: 22px;
  border: 1px solid #ddd4c7;
  border-radius: 8px;
  background: #fffdfa;
  box-shadow: 0 18px 40px rgba(46, 38, 27, .08);
}

.collaboration-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #ddd4c7;
  border-radius: 8px;
  background: #fffdfa;
  box-shadow: 0 18px 40px rgba(46, 38, 27, .08);
}

.invite-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 220px) auto;
  gap: 12px;
  align-items: end;
}

.access-invite-form {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.member-list {
  display: grid;
  gap: 8px;
}

.member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e6ddd0;
  border-radius: 8px;
  background: #f9f5ee;
}

.member-row span:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.member-row small {
  color: #697277;
  overflow-wrap: anywhere;
}

.member-role-form {
  display: inline;
}

.member-role-form select {
  width: auto;
}

.muted-panel-copy {
  margin: 0;
  color: #697277;
}

.pending-invitations {
  display: grid;
  gap: 8px;
}

.pending-invitation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e6ddd0;
  border-radius: 8px;
  background: #f9f5ee;
}

.pending-invitation span:first-child {
  display: grid;
  gap: 2px;
}

.pending-invitation form {
  margin: 0;
}

.settings-panel h2 {
  margin: 0 0 18px;
  color: #223033;
  font-size: 1.12rem;
  font-weight: 850;
}

.status-message {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #bad7c7;
  border-radius: 8px;
  background: #e5f3ec;
  color: #1f5b4c;
  font-weight: 800;
}

.status-message-inline {
  display: flex;
  align-items: center;
  gap: 7px;
}

.status-pill.danger {
  color: #9a3d35;
}

.admin-users-panel,
.admin-user-detail-panel {
  overflow: hidden;
}

.admin-user-table-wrap {
  overflow-x: auto;
}

.admin-user-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.admin-user-table th,
.admin-user-table td {
  padding: 12px;
  border-bottom: 1px solid #e8e0d5;
  vertical-align: middle;
}

.admin-user-table th {
  color: #526065;
  font-size: .78rem;
  text-align: left;
  text-transform: uppercase;
}

.admin-user-table tr.is-soft-deleted {
  background: #f8f0ed;
}

.admin-user-link {
  display: grid;
  gap: 2px;
  color: inherit;
  text-decoration: none;
}

.admin-user-link:hover,
.admin-user-link:focus {
  color: #1f5b4c;
}

.admin-user-link small,
.admin-project-counts {
  color: #697277;
}

.admin-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-action-row form {
  margin: 0;
}

.prompt-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.prompt-tabs {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  min-height: 46px;
  padding: 4px;
  border: 1px solid #d8cfc2;
  border-radius: 11px;
  background: #ebe7de;
  box-shadow: inset 0 1px 2px rgba(46, 38, 27, .06);
}

.prompt-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 17px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #526065;
  font-size: .92rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}

.prompt-tab:not(.active):hover {
  border-color: #d8cfc2;
  background: #fffdfa;
  color: #1f5b4c;
}

.prompt-tab:focus-visible {
  outline: 3px solid rgba(47, 143, 114, .28);
  outline-offset: 2px;
}

.prompt-tab.active {
  border-color: #25363b;
  background: #25363b;
  color: #fffdfa;
  box-shadow: 0 2px 5px rgba(37, 54, 59, .2);
}

.prompt-create-button {
  min-height: 42px;
  margin-right: 10px;
  padding: 9px 18px;
  font-weight: 750;
}

.prompt-empty-action {
  border-color: #2f8f72;
  box-shadow: 0 0 0 4px rgba(47, 143, 114, .22), 0 18px 40px rgba(46, 38, 27, .08);
  animation: targetShadowPulse 1.25s ease-in-out infinite;
}

.prompt-empty-create-button {
  justify-self: start;
  min-height: 48px;
  margin-top: 10px;
  padding: 11px 22px;
  font-size: 1.02rem;
  font-weight: 800;
}

.prompt-empty-state {
  display: grid;
  gap: 10px;
  align-content: center;
  min-height: 320px;
  padding: 42px 0;
}

.prompt-empty-state h2 {
  max-width: 1180px;
  color: #182626;
  font-size: clamp(3.8rem, 9vw, 8rem);
  font-weight: 850;
  line-height: .9;
}

.prompt-empty-state p {
  max-width: 620px;
  margin: 0;
  color: #566368;
  font-size: 1.05rem;
  line-height: 1.6;
}

.prompt-library-groups,
.prompt-form,
.prompt-share-list,
.prompt-feedback-list {
  display: grid;
  gap: 14px;
}

.prompt-form.compact {
  gap: 10px;
  margin-bottom: 18px;
}

.prompt-feedback-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 20px;
  align-items: start;
}

.prompt-feedback-add {
  padding-left: 20px;
  border-left: 1px solid #e6ddd0;
}

.prompt-list-panel h2,
.prompt-share-panel h2,
.prompt-feedback-panel h2 {
  margin-bottom: 14px;
}

.prompt-pending-notice {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 12px;
  padding: 5px 9px;
  border: 1px solid #d8cfc2;
  border-radius: 4px;
  background: #f5f1e9;
  color: #3d494d;
  font-size: .86rem;
  font-weight: 800;
}

.prompt-list {
  display: grid;
  gap: 10px;
}

.prompt-list-item {
  display: block;
  padding: 14px;
  border: 1px solid #e6ddd0;
  border-radius: 8px;
  background: #fffdfa;
}

.prompt-list-item[data-prompt-row-url] {
  cursor: pointer;
}

.prompt-list-item[data-prompt-row-url]:hover,
.prompt-list-item[data-prompt-row-url]:focus-within {
  border-color: #d5d5d5;
  background: #f7f7f7;
}

.prompt-list-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.prompt-list-title-row,
.prompt-list-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  min-width: 0;
}

.prompt-list-title,
.prompt-list-description {
  color: inherit;
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prompt-list-title {
  color: #1d2428;
  font-weight: 850;
}

.prompt-list-description-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.prompt-list-copy-button {
  flex: 0 0 auto;
}

.prompt-status-button[aria-disabled="true"] {
  cursor: default;
  opacity: .55;
}

.prompt-status-button[aria-disabled="true"]:hover,
.prompt-status-button[aria-disabled="true"]:focus {
  border-color: #6c757d;
  background: transparent;
  color: #6c757d;
  box-shadow: none;
}

.prompt-list-description {
  color: #697277;
  font-size: .9rem;
}

.prompt-list-item[data-prompt-row-url]:hover .prompt-list-title,
.prompt-list-item[data-prompt-row-url]:focus-within .prompt-list-title {
  color: #1f5b4c;
}

.prompt-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.prompt-list-actions form {
  margin: 0;
}

.workspace-template-list-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-width: 0;
}

.workspace-template-list-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workspace-template-list-copy p {
  margin: 0;
}

.workspace-template-list-meta-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.workspace-template-list-meta-actions > .prompt-list-description {
  flex: 0 1 auto;
}

.prompt-summary-tip {
  border: 1px solid #d8cfc2;
  max-width: min(380px, calc(100vw - 32px));
  box-shadow: 0 8px 18px rgba(37, 54, 59, .10) !important;
  z-index: 80;
}

.prompt-summary-tip-content {
  display: grid;
  gap: 4px;
}

.prompt-summary-tip-content strong,
.prompt-summary-tip-content span {
  overflow-wrap: anywhere;
}

.prompt-summary-tip-content span {
  color: #697277;
  font-size: .9rem;
}

.prompt-list-stats,
.prompt-detail-meta,
.prompt-detail-inline-meta,
.prompt-copy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.prompt-list-stats {
  color: #697277;
  flex-wrap: nowrap;
  font-size: .86rem;
  white-space: nowrap;
}

.prompt-detail-meta {
  margin-right: 10px;
  transform: translateY(2px);
}

.prompt-detail-inline-meta {
  margin: 0 0 .55rem;
  color: #697277;
  font-size: .9rem;
}

.prompt-detail-source {
  color: #697277;
  font-size: .88rem;
}

.prompt-detail-source strong {
  color: #3d494d;
  font-weight: 750;
}

.prompt-detail-meta > span:not(:first-child)::before,
.prompt-detail-inline-meta span + span::before,
.prompt-list-stats span + span::before {
  content: "\00b7";
  margin-right: 8px;
  color: #9aa0a3;
}

.workspace-prompts-panel {
  margin-bottom: 18px;
}

.workspace-prompts-section {
  border: 1px solid #ddd4c7;
  border-radius: 8px;
  background: #fffdfa;
  box-shadow: 0 18px 40px rgba(46, 38, 27, .08);
  padding: 16px;
}

.workspace-prompts-section .prompt-list {
  gap: 10px;
}

.workspace-prompts-drawer {
  margin-bottom: 0;
}

.workspace-prompts-drawer summary {
  align-items: center;
}

.workspace-prompt-count {
  color: #697277;
  font-size: .86rem;
  font-weight: 800;
}

.workspace-prompts-content {
  display: grid;
  gap: 12px;
  margin-top: 0;
}

.workspace-prompt-create-link {
  justify-self: start;
}

.workspace-prompt-kind {
  color: #697277;
  font-size: .86rem;
  font-weight: 750;
  white-space: nowrap;
}

.prompt-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 18px;
  align-items: start;
}

.rule-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.rule-detail-grid > .settings-panel {
  min-width: 0;
}

.rule-edit-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
}

.rule-update-form {
  display: contents;
}

.rule-update-form > *,
.prompt-detail-update-form > * {
  grid-column: 1 / -1;
}

.rule-title-field,
.prompt-name-field {
  grid-column: 1;
}

.rule-edit-form-grid:not(.has-owner-move) .rule-title-field,
.rule-edit-form-grid:not(.has-owner-move) .prompt-name-field {
  grid-column: 1 / -1;
}

.prompt-detail-update-form {
  display: contents;
}

.prompt-public-field {
  margin-top: 2px;
  margin-bottom: 6px;
}

.rule-owner-move-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  align-self: start;
  grid-column: 2;
  grid-row: 1;
  margin: 0;
}

.rule-owner-move-form button {
  min-width: 76px;
}

.rule-main-panel,
.rule-comments-panel,
.rule-use-panel,
.rule-versions-panel,
.rule-delete-panel {
  grid-column: 1 / -1;
}

.rule-reviews-panel,
.rule-share-panel {
  grid-column: 1 / -1;
  grid-row: auto;
}

.rule-use-panel {
  grid-row: auto;
}

.rule-versions-panel {
  grid-row: auto;
}

.rule-delete-panel {
  grid-row: auto;
}

.rule-comments-grid,
.rule-reviews-grid,
.rule-share-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rule-use-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rule-use-add {
  min-width: 0;
}

.rule-use-add .nested-form,
.rule-share-panel .nested-form:first-of-type {
  margin-top: 0;
}

.rule-use-grid .linked-workspaces {
  min-width: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.rule-reviews-panel .prompt-form.compact {
  margin-top: 16px;
  margin-bottom: 0;
}

.prompt-main-panel,
.prompt-share-panel,
.prompt-reviews-panel,
.prompt-comments-panel {
  grid-column: 1 / -1;
}

.prompt-content-editor {
  min-height: 420px;
}

.prompt-copy-actions {
  justify-content: space-between;
  margin-bottom: 12px;
}

.prompt-copy-actions form {
  margin: 0;
}

.prompt-share-form {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.prompt-share-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 20px;
  align-items: start;
}

.prompt-share-add {
  padding-left: 20px;
  border-left: 1px solid #e6ddd0;
}

.prompt-share-add .prompt-share-form:last-child {
  margin-bottom: 0;
}

.prompt-feedback-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #e6ddd0;
  border-radius: 8px;
  background: #f9f5ee;
}

.prompt-feedback-item span {
  color: #697277;
  font-size: .84rem;
}

.prompt-feedback-item p {
  margin: 0;
}

.prompt-feedback-item pre {
  margin: 6px 0 0;
  padding: 10px;
  border-radius: 6px;
  background: #f5f1e9;
  white-space: pre-wrap;
}

.workspace-list {
  display: grid;
  gap: 12px;
  align-content: start;
}

.workspace-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  border: 1px solid #ddd4c7;
  border-radius: 8px;
  background: #fffdfa;
}

.workspace-item.role-group-spacer {
  margin-top: 24px;
}

.workspace-item-link {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.workspace-item:hover {
  border-color: #8aa99a;
}

.workspace-item-link span:first-child {
  display: grid;
  gap: .2rem;
  min-width: 0;
}

.workspace-item form {
  margin: 0;
  flex: 0 0 auto;
}

.workspace-item small,
.section-heading span,
.form-help,
.block-card small,
.matrix-table small {
  color: #697277;
}

.role-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: .82rem;
  line-height: 1.5;
}

.access-mode-badge {
  border: 1px solid transparent;
  text-decoration: none;
}

a.access-mode-badge {
  cursor: pointer;
}

.access-mode-badge.selected {
  border-color: currentColor;
  box-shadow: 0 0 0 2px rgba(37, 109, 90, .12);
}

.access-mode-badge.inactive {
  border-color: #d8cfc2;
  background: #f5f1e9;
  color: #697277;
}

.access-mode-badge.inactive:hover,
.access-mode-badge.inactive:focus {
  border-color: #8aa99a;
  color: #1f5b4c;
}

.role-owner {
  background: #e8f0ec;
  color: #3d7a5e;
}

.role-editor {
  background: #e3edf5;
  color: #3d6b8a;
}

.role-viewer {
  background: #f0f0ee;
  color: #6b6f73;
}

.role-administrator {
  background: #f2e8d7;
  color: #8f3e2f;
}

.cockpit {
  --editor-col: minmax(280px, .95fr);
  --target-col: minmax(0, 1.05fr);
  --preview-col: minmax(0, 1.1fr);
  display: grid;
  grid-template-columns: var(--editor-col) 16px var(--target-col) 16px var(--preview-col);
  column-gap: 8px;
  row-gap: 16px;
  align-items: start;
}

.editor-column,
.target-column,
.preview-column {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.target-column > *,
.preview-column > *,
.matrix-panel,
.readable-preview,
.raw-preview {
  min-width: 0;
  max-width: 100%;
}

.column-resizer {
  position: relative;
  align-self: start;
  width: 16px;
  height: 72px;
  cursor: col-resize;
  touch-action: none;
}

.column-resizer::before,
.column-resizer::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 2px;
  height: calc(100% - 4px);
  border-radius: 999px;
  transform: translateX(-50%);
}

.column-resizer::before {
  width: 8px;
  background: transparent;
}

.column-resizer::after {
  width: 2px;
  background: #d8cfc2;
  transition: width .12s ease, background-color .12s ease;
}

.column-resizer:hover::after,
.column-resizer.dragging::after {
  width: 8px;
  background: #8aa99a;
}

body.column-resize-active {
  cursor: col-resize;
  user-select: none;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.cockpit > section > .section-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  padding-inline: 10px;
}

.section-heading h2,
.create-panel h2,
.matrix-panel h2,
.empty-state h2 {
  margin: 0;
  color: #223033;
  font-size: 1.05rem;
  font-weight: 800;
}

.section-heading > div {
  display: grid;
  gap: 2px;
}

.cockpit > .target-column > .section-heading {
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  padding-inline: 10px;
}

.cockpit > .target-column > .section-heading.has-heading-actions {
  grid-template-columns: minmax(0, auto) auto minmax(0, 1fr);
}

.target-column > .section-heading [data-write-all-targets] {
  flex: 0 0 auto;
}

.target-heading-action {
  margin-left: 8px;
  transform: translateY(2px);
}

.cockpit > section > .section-heading > span:not(.section-heading-title):not(.section-heading-actions) {
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-tabs {
  min-width: 0;
}

.editor-tab-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 3px;
  border: 1px solid #d8cfc2;
  border-radius: 6px;
  background: #f5f1e9;
}

.editor-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #526065;
  cursor: pointer;
  font: inherit;
  font-size: .86rem;
  font-weight: 850;
  line-height: 1.15;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}

.editor-tab-count {
  color: #697277;
  font-size: .78rem;
  font-weight: 850;
}

.editor-tab:hover,
.editor-tab:focus-visible {
  border-color: #c9beae;
  color: #1f5b4c;
  outline: 0;
}

.editor-tab:hover .editor-tab-count,
.editor-tab:focus-visible .editor-tab-count {
  color: inherit;
}

.editor-tab.active {
  background: #fffdfa;
  border-color: #d8cfc2;
  color: #223033;
  box-shadow: 0 1px 2px rgba(37, 54, 59, .08);
}

.editor-tab-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.editor-tab-panel[hidden] {
  display: none;
}

.section-heading-title,
.section-heading-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.column-expand-button {
  display: inline-flex;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: transparent;
  color: #697277;
}

.column-expand-button:hover,
.column-expand-button:focus-visible {
  border-color: #d8cfc2;
  background: #f5f1e9;
  color: #1f5b4c;
  outline: 0;
}

.column-expand-button .flexicon {
  transform: translateY(2px);
}

.form-help {
  display: block;
  margin-top: -6px;
  font-size: .82rem;
}

.inline-editor,
.block-card,
.matrix-panel,
.readable-preview,
.empty-state {
  box-sizing: border-box;
  padding: 16px;
}

.inline-editor,
.block-card {
  overflow: hidden;
  transition: border-color .14s ease;
}

.inline-editor:hover,
.block-card:hover {
  border-color: #d5d5d5;
}

.inline-editor:hover > summary,
.block-card:hover > summary {
  background: #f7f7f7;
}

.inactive-block-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 2px 7px;
  border: 1px solid #b8b0a6;
  border-radius: 999px;
  background: #ece7df;
  color: #5f6568;
  font-size: .72rem;
  font-weight: 850;
  line-height: 1.25;
  text-transform: uppercase;
  white-space: nowrap;
}

.is-inactive-block {
  border-color: #d4cdc4;
  background: #f1eee8;
}

.is-inactive-block :where(.block-summary-text strong, .matrix-block-link, .html-tree-title) {
  color: #5f6568;
}

.is-inactive-block :where(small, .html-tree-meta, .html-tree-rendered-content) {
  color: #747b7d;
}

.block-card.is-inactive-block:hover > summary {
  background: #ebe6de;
}

.block-card.block-card-scroll-target {
  border-color: #256d5a;
  box-shadow: 0 0 0 3px rgba(37, 109, 90, .16);
}

.inline-editor:not([open]) {
  display: flex;
  align-items: center;
  height: 68px;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.inline-editor:not([open]) > summary {
  width: calc(100% + 32px);
}

.inline-editor summary,
.block-card summary {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -16px;
  padding: 16px;
  cursor: pointer;
  font-weight: 800;
}

.inline-editor[open] > summary,
.block-card[open] > summary {
  margin-bottom: 0;
}

.inline-editor:not([open]) .inline-editor-summary-actions {
  display: none;
}

.inline-editor-summary-button:hover,
.inline-editor-summary-button:focus-visible {
  border-color: #256d5a;
  background: #e5f0ec;
  color: #1f5b4c;
  box-shadow: 0 0 0 3px rgba(37, 109, 90, .18);
}

.inline-editor:not([open]) > summary {
  min-height: 68px;
  margin-top: 0;
  margin-bottom: 0;
  align-items: center;
}

.block-card.is-draggable:not([open]) > summary {
  margin-right: -30px;
  padding-right: 30px;
}

.block-empty-prompt,
.target-empty-prompt,
.workspace-empty-prompt {
  border-color: #2f8f72;
  box-shadow: 0 0 0 4px rgba(47, 143, 114, .22), 0 18px 40px rgba(46, 38, 27, .08);
  animation: targetShadowPulse 1.25s ease-in-out infinite;
}

.block-empty-prompt summary,
.target-empty-prompt summary {
  color: #1f5b4c;
}

.block-empty-prompt[open],
.target-empty-prompt[open] {
  border-color: #ddd4c7;
  box-shadow: 0 18px 40px rgba(46, 38, 27, .08);
  animation: none;
}

.block-empty-prompt[open] summary,
.target-empty-prompt[open] summary {
  color: #223033;
}

.empty-target-callout {
  padding: 18px;
  border: 2px solid #2f8f72;
  border-radius: 8px;
  background: #e9f6ef;
  color: #243d35;
  box-shadow: 0 18px 40px rgba(46, 38, 27, .1);
}

.empty-target-callout strong {
  display: block;
  color: #1f5b4c;
  font-size: 1.05rem;
  font-weight: 900;
}

.empty-target-callout p {
  margin: 6px 0 0;
  font-weight: 750;
}

.field-help-tip,
.target-sort-tip {
  max-width: min(360px, calc(100vw - 32px));
  color: #263437;
  font-size: .86rem;
  line-height: 1.45;
}

.field-help-tip p,
.target-sort-tip p {
  margin: 6px 0;
}

.field-help-tip ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.field-help-tip li + li {
  margin-top: 4px;
}

@keyframes targetShadowPulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(47, 143, 114, .2), 0 18px 40px rgba(46, 38, 27, .08);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(47, 143, 114, .46), 0 18px 44px rgba(47, 143, 114, .2);
  }
}

.inline-editor form,
.nested-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.rule-apply-status {
  min-height: 1.25rem;
  color: #256d5a;
  font-size: .86rem;
  font-weight: 800;
}

.rule-apply-status.error {
  color: #9a3d35;
}

.linked-workspaces {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #eadfd2;
}

.linked-workspaces h3 {
  margin: 0;
  color: #223033;
  font-size: .96rem;
  font-weight: 850;
}

.linked-workspace-list {
  display: grid;
  gap: 8px;
}

.linked-workspace-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px 132px;
  gap: 10px;
  align-items: baseline;
  padding: 10px;
  border: 1px solid #e6ddd0;
  border-radius: 6px;
  background: #f9f5ee;
}

.linked-workspace-row a,
.linked-workspace-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.linked-workspace-row a {
  color: #1f5b4c;
  font-weight: 850;
  text-decoration: none;
}

.linked-workspace-row a:hover,
.linked-workspace-row a:focus {
  text-decoration: underline;
  text-underline-offset: .16em;
}

.linked-workspace-row span {
  color: #657074;
  font-size: .84rem;
  font-weight: 750;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.code-input,
.raw-preview,
.block-content,
.readable-preview pre,
.html-tree-content pre {
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: .88rem;
  line-height: 1.55;
}

.block-stack {
  display: grid;
  gap: 10px;
}

.block-stack.saving {
  opacity: .72;
  pointer-events: none;
}

.block-stack.drag-active .block-card:not(.dragging) {
  transition: border-color .12s ease, background-color .12s ease;
}

.block-card.dragging {
  border-color: #8aa99a;
  background: #f3f8f5;
  opacity: .72;
  cursor: grabbing;
}

.block-card.is-draggable {
  position: relative;
  padding-right: 30px;
}

.block-card.is-draggable[open] {
  padding-right: 16px;
}

.block-card summary > span:first-child {
  display: grid;
  gap: 2px;
}

.block-card summary .block-summary-main {
  display: flex;
  align-items: center;
  min-width: 0;
}

.block-summary-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.block-linked-badge {
  color: #8f3e2f;
  font-weight: 900;
}

.block-summary-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.block-drag-handle {
  position: absolute;
  inset: 0 0 0 auto;
  width: 14px;
  border-left: 1px solid rgba(198, 188, 175, .82);
  border-radius: 0 8px 8px 0;
  cursor: move;
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 4px,
    rgba(82, 96, 101, .42) 4px,
    rgba(82, 96, 101, .42) 6px
  );
  opacity: .24;
  transition: opacity .12s ease, background-color .12s ease, border-color .12s ease;
}

.block-drag-handle::before {
  content: none;
}

.block-card.is-draggable[open] .block-drag-handle {
  display: none;
}

.block-card.is-draggable:hover .block-drag-handle {
  opacity: .38;
}

.block-drag-handle:hover,
.block-drag-handle:focus {
  border-color: #c8bdae;
  background-color: #f5f1e9;
  opacity: .62;
  outline: 0;
}

.block-drag-handle:active {
  cursor: move;
}

.readable-preview pre {
  margin: 12px 0;
  white-space: pre-wrap;
  color: #2f3d41;
  background: #f5f1e9;
  border-radius: 6px;
  padding: 12px;
}

.instruction-block-body {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.instruction-block-metadata {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 9px;
  border: 1px solid #d9e2dd;
  border-radius: 6px;
  background: #eef5f1;
  color: #526065;
  font-size: .82rem;
  font-weight: 750;
}

.instruction-block-condition {
  padding: 3px 7px;
  border: 1px solid #cfdcd6;
  border-radius: 4px;
  background: #fffdfa;
  overflow-wrap: anywhere;
}

.instruction-block-actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

.instruction-block-actions form {
  margin: 0;
}

.prompt-card-action-row {
  align-items: center;
}

.prompt-card-actions-left {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-left: 0;
  margin-right: auto;
}

.prompt-card-actions-right {
  justify-content: flex-end;
  margin-left: auto;
}

.prompt-card-description {
  display: block;
}

.prompt-card-description .instruction-block-condition {
  display: block;
  width: 100%;
}

.instruction-block-edit-toggle {
  min-width: 78px;
}

.rule-auto-update-state {
  display: inline-block;
  min-width: 2.1ch;
  text-align: left;
}

.instruction-block-view {
  color: #2f3d41;
  background: #f5f1e9;
  border-radius: 6px;
  padding: 12px;
}

.instruction-block-view > div {
  display: grid;
  gap: 8px;
}

.instruction-block-view :where(p, ul, ol, blockquote, pre) {
  margin: 0;
}

.instruction-block-view :where(ul, ol) {
  padding-left: 22px;
}

.instruction-block-view pre {
  white-space: pre-wrap;
}

.instruction-block-edit-panel .nested-form {
  margin-top: 0;
}

.muted {
  color: #8b9295;
}

.form-actions {
  display: flex;
  gap: .5rem;
}

.target-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.target-action-row form {
  margin: 0;
}

.btn-link-danger {
  padding-inline: 0;
  border: 0;
  color: #9a3d35;
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
}

.btn-link-danger:hover,
.btn-link-danger:focus {
  color: #6f2a25;
  text-decoration: underline;
}

.btn:disabled,
.btn.disabled {
  opacity: .55;
  pointer-events: none;
}

.btn-primary:disabled {
  background: #68747a;
  border-color: #68747a;
}

.btn-link-danger:disabled {
  opacity: .55;
  pointer-events: none;
  color: #8a7878;
  text-decoration: none;
}

.target-tabs-region {
  display: grid;
  gap: 0;
  min-width: 0;
  transition: gap .36s ease;
}

.target-tabs-region.has-open-panel {
  gap: 14px;
}

.target-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.target-tabs.drag-active .target-tab-split:not(.dragging) {
  opacity: .78;
}

.target-tabs.saving {
  opacity: .72;
  pointer-events: none;
}

.target-tab-split {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  border: 1px solid #d8cfc2;
  border-radius: 8px;
  background: #fffdfa;
  color: #3b474a;
  overflow: hidden;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}

.target-tab-split.dragging {
  border-color: #8aa99a;
  background: #f3f8f5;
  opacity: .72;
  cursor: grabbing;
}

.target-tab-drag-handle {
  width: 14px;
  min-height: 100%;
  flex: 0 0 14px;
  border-left: 1px solid rgba(198, 188, 175, .82);
  cursor: move;
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 4px,
    rgba(82, 96, 101, .42) 4px,
    rgba(82, 96, 101, .42) 6px
  );
  opacity: .24;
  transition: opacity .12s ease, background-color .12s ease, border-color .12s ease;
}

.target-tab-drag-handle:hover,
.target-tab-drag-handle:focus {
  border-color: #c8bdae;
  background-color: #f5f1e9;
  opacity: .62;
  outline: 0;
}

.target-tab-split:hover .target-tab-drag-handle {
  opacity: .38;
}

.target-tab-main {
  min-width: 0;
  max-width: 100%;
  padding: 8px 11px 8px 13px;
  color: inherit;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background-color .14s ease, color .14s ease;
}

.target-tab-settings-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-height: 100%;
  border: 0;
  border-left: 1px solid rgba(216, 207, 194, .92);
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease;
}

.target-tab-settings-toggle .flexicon {
  transition: transform .14s ease;
}

.target-tab-split:focus-within {
  border-color: #8aa99a;
  color: #1f5b4c;
}

.target-tab-split:not(.active) .target-tab-main:hover,
.target-tab-split:not(.active) .target-tab-main:focus-visible {
  background: #eef5f1;
  color: #1f5b4c;
  outline: 0;
}

.target-tab-settings-toggle:hover,
.target-tab-settings-toggle:focus-visible {
  background: rgba(138, 169, 154, .2);
  color: #1f5b4c;
  outline: 0;
}

.target-tab-split.active {
  color: #fffdfa;
  background: #25363b;
  border-color: #25363b;
}

.target-tab-split.active:focus-within {
  border-color: #1f5b4c;
  color: #fffdfa;
}

.target-tab-split.active .target-tab-settings-toggle:hover,
.target-tab-split.active .target-tab-settings-toggle:focus-visible {
  background: #1f5b4c;
  color: #fffdfa;
}

.target-tab-split.active .target-tab-main {
  cursor: default;
}

.target-tab-split.active .target-tab-settings-toggle {
  border-left-color: rgba(255, 253, 250, .22);
}

.target-tab-split.active .target-tab-drag-handle {
  border-left-color: rgba(255, 253, 250, .22);
}

.target-tab-split.active .target-tab-drag-handle:hover,
.target-tab-split.active .target-tab-drag-handle:focus {
  border-color: rgba(255, 253, 250, .32);
  background-color: #1f5b4c;
  opacity: .72;
}

.target-tab-split.settings-open {
  border-color: #d8cfc2;
}

.target-tab-split.settings-open .target-tab-settings-toggle {
  background: #c7d8d0;
  border-left-color: rgba(23, 40, 45, .24);
  color: #17282d;
}

.target-tab-split.settings-open .target-tab-settings-toggle:hover,
.target-tab-split.settings-open .target-tab-settings-toggle:focus-visible {
  background: #d5e2dc;
  color: #17282d;
}

.target-tab-split.settings-open .target-tab-settings-toggle .flexicon {
  transform: rotate(180deg);
}

.target-tab-split.loading {
  opacity: .65;
  pointer-events: none;
}

.target-settings-region {
  height: 0;
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  transition: height .45s ease, max-height .45s ease;
}

.target-settings-region.has-open-panel {
  height: auto;
  max-height: 1280px;
}

.target-settings-panel {
  display: grid;
  gap: 0;
  max-height: 0;
  margin: 0;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fffdfa;
  box-shadow: none;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition:
    max-height .45s ease,
    padding .45s ease,
    border-color .3s ease,
    box-shadow .3s ease,
    opacity .3s ease,
    transform .45s ease;
}

.target-settings-panel.is-open {
  gap: 12px;
  max-height: 1200px;
  padding: 16px;
  border-color: #ddd4c7;
  box-shadow: 0 18px 40px rgba(46, 38, 27, .08);
  opacity: 1;
  transform: translateY(0);
}

.target-settings-panel form {
  display: grid;
  gap: 12px;
}

.nested-form-check {
  margin-left: 28px;
  margin-top: -6px;
}

.target-settings-panel-header {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: #25363b;
}

.target-settings-panel-header strong {
  font-size: .98rem;
  font-weight: 900;
}

.target-settings-panel-header span {
  color: #697277;
  font-size: .82rem;
  overflow-wrap: anywhere;
}

.matrix-scroll {
  overflow-x: auto;
}

.matrix-panel-meta {
  display: flex;
  justify-content: flex-end;
  padding-inline: 10px;
  margin-bottom: -4px;
}

.matrix-unassociated-counter {
  color: #697277;
  font-size: .82rem;
  font-weight: 700;
  text-align: right;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.matrix-table th,
.matrix-table td {
  padding: 10px;
  border-bottom: 1px solid #e8e0d5;
  vertical-align: middle;
}

.matrix-table th {
  color: #526065;
  font-size: .78rem;
  text-transform: uppercase;
}

.matrix-table td:first-child {
  display: grid;
  gap: 4px;
}

.matrix-block-link {
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #223033;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
}

.matrix-block-link:hover,
.matrix-block-link:focus-visible {
  color: #256d5a;
  text-decoration-color: currentcolor;
  outline: none;
}

.matrix-toggle {
  min-width: 54px;
  padding: 5px 8px;
  border: 1px solid #d6c8b8;
  border-radius: 999px;
  background: #f4eee5;
  color: #657074;
  font-weight: 800;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease;
}

.matrix-toggle:hover,
.matrix-toggle:focus {
  border-color: #b99b78;
  background: #fff8ed;
  color: #3d494d;
}

.matrix-toggle.on {
  border-color: #256d5a;
  background: #dcece5;
  color: #1f5b4c;
}

.matrix-table tr.is-inactive-block td {
  background: #f1eee8;
}

.matrix-table tr.is-inactive-block .matrix-toggle.on {
  border-color: #9d9489;
  background: #e4dfd7;
  color: #5f6568;
}

.matrix-inactive-block-badge {
  margin-top: 1px;
}

.matrix-toggle.on:hover,
.matrix-toggle.on:focus {
  border-color: #1f5b4c;
  background: #cbe3d8;
  color: #16483c;
}

.matrix-toggle.loading {
  opacity: .7;
}

.matrix-toggle:disabled {
  opacity: 1;
  pointer-events: none;
}

.readable-preview {
  max-height: 740px;
  overflow-x: hidden;
  overflow-y: scroll;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  margin: 12px 0 8px;
}

.preview-actions.has-target-write-status {
  margin-bottom: 28px;
}

.preview-tab-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 8px 0 14px;
}

.preview-write-control {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  min-width: 0;
}

.preview-write-control > [data-write-target] {
  justify-self: start;
}

.custom-sort-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  margin: 0;
  white-space: nowrap;
}

.custom-sort-toggle .form-check-input {
  margin: 0;
}

.target-sort-tip-target {
  display: inline-flex;
  align-items: center;
  color: #526065;
  white-space: nowrap;
}

.target-sort-help {
  display: inline-flex;
  align-items: center;
  margin-left: -2px;
  color: #526065;
  font-size: .9rem;
  white-space: nowrap;
}

.target-write-status {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: min(360px, calc(100vw - 48px));
  min-height: 1.35rem;
  padding: 2px 2px 2px 0;
  color: #256d5a;
  font-size: .82rem;
  font-weight: 750;
  line-height: 1.25;
  white-space: nowrap;
}

.target-write-status[hidden] {
  display: none;
}

.target-write-status.error {
  color: #9a3d35;
}

.target-write-status.flash {
  animation: targetWriteStatusFlash .7s ease;
}

.target-write-status-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #8b9295;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  transition: background-color .12s ease, color .12s ease, opacity .12s ease;
}

.target-write-status:hover .target-write-status-dismiss,
.target-write-status:focus-within .target-write-status-dismiss {
  opacity: 1;
}

.target-write-status-dismiss:hover,
.target-write-status-dismiss:focus-visible {
  background: #f3e2df;
  color: #9a3d35;
  outline: 0;
}

@keyframes targetWriteStatusFlash {
  0% {
    background: rgba(37, 109, 90, .14);
  }

  100% {
    background: transparent;
  }
}

.preview-tab-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 3px;
  border: 1px solid #d8cfc2;
  border-radius: 6px;
  background: #f5f1e9;
}

.preview-tab {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #526065;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: 0;
}

.preview-tab:hover,
.preview-tab:focus {
  border-color: #c9beae;
  color: #1f5b4c;
  outline: 0;
}

.preview-tab.active {
  border-color: #d8cfc2;
  background: #fffdfa;
  color: #223033;
}

.preview-tab-panel {
  display: grid;
  gap: 14px;
}

.preview-tab-panel[data-preview-tab-panel="raw"] {
  height: 510px;
  min-height: 0;
}

.preview-tab-panel[hidden] {
  display: none;
}

.html-preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.html-preview-toolbar-group {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 8px;
}

.html-preview-toolbar-actions {
  margin-left: auto;
  justify-content: flex-end;
}

.html-preview-toolbar [data-preview-tree-action].active {
  border-color: #256d5a;
  background: #dcece5;
  color: #1f5b4c;
  box-shadow: inset 0 0 0 1px rgba(37, 109, 90, .16);
}

.html-preview-toolbar [data-preview-tree-action].active:hover,
.html-preview-toolbar [data-preview-tree-action].active:focus {
  border-color: #1f5b4c;
  background: #cfe5da;
  color: #16483c;
}

.html-preview-linked-status-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #7b8588;
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}

.html-preview-linked-status-toggle-target {
  display: inline-flex;
}

.html-preview-linked-status-toggle:hover,
.html-preview-linked-status-toggle:focus-visible {
  border-color: #cfdcd6;
  background: #eef5f1;
  outline: 0;
}

.html-preview-linked-status-toggle.is-showing-status {
  color: #16785f;
}

.html-preview-linked-status-toggle .flexicon {
  display: block;
  width: 28px;
  height: 28px;
}

.html-preview-tree {
  display: grid;
  gap: 8px;
}

.html-tree-category-list {
  display: grid;
  gap: 8px;
}

.html-tree-node,
.html-tree-add-node,
.html-tree-edit-node {
  border: 1px solid #e3d9ca;
  border-radius: 6px;
  background: #fffdfa;
  overflow: hidden;
}

.html-tree-node summary,
.html-tree-add-node summary,
.html-tree-edit-node summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  cursor: pointer;
  font-weight: 850;
}

.html-tree-category > summary {
  background: #f8f4ed;
}

.html-tree-block > summary {
  position: relative;
  padding-left: 17px;
  padding-right: 30px;
  background: #fffdfa;
}

.html-tree-block {
  position: relative;
  transition: border-color .14s ease;
}

.html-tree-block::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 5px 0 0 5px;
  background: transparent;
  z-index: 1;
  pointer-events: none;
}

.html-tree-block:hover {
  border-color: #d5d5d5;
}

.html-tree-block:hover > summary {
  background: #f7f7f7;
}

.html-tree-block.is-inactive-block > summary,
.html-tree-block.is-inactive-block:hover > summary {
  background: #ebe6de;
}

.html-tree-block.is-inactive-block::before {
  background: #9d9489;
}

.html-tree-block.is-last-closed {
  border-color: #c7d4ce;
  border-left-color: #5f8d7d;
}

.html-tree-block.is-last-closed::before {
  background: #5f8d7d;
}

.html-tree-block-drag-handle {
  position: absolute;
  inset: 0 0 0 auto;
  width: 14px;
  border-radius: 0 6px 6px 0;
}

.html-tree-block-drag-handle.disabled {
  cursor: default;
  opacity: .16;
}

.html-tree-block-drag-handle.disabled:hover,
.html-tree-block-drag-handle.disabled:focus {
  border-color: rgba(198, 188, 175, .82);
  background-color: transparent;
  opacity: .22;
}

.html-preview-tree.drag-active .html-tree-block:not(.dragging) {
  transition: border-color .12s ease, background-color .12s ease;
}

.html-preview-tree.saving {
  opacity: .72;
  pointer-events: none;
}

.html-tree-block.dragging {
  border-color: #8aa99a;
  background: #f3f8f5;
  opacity: .72;
}

.html-tree-metadata-semantics > summary {
  padding-right: 10px;
}

.html-tree-metadata-semantics .html-tree-content {
  padding-left: 10px;
}

.html-tree-metadata-semantics-section {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid #e3d9ca;
  border-radius: 6px;
  background: #f8f4ed;
  color: #2f3d41;
  font-size: .88rem;
  line-height: 1.5;
}

.html-tree-metadata-semantics-section ul {
  margin: 0;
  padding-left: 18px;
}

.html-tree-metadata-semantics-section li + li {
  margin-top: 4px;
}

.html-tree-children.drag-over {
  background: #f3f8f5;
}

.html-tree-title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.html-tree-title-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.topic-field {
  display: grid;
  gap: 8px;
}

.html-tree-block > summary .html-tree-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.html-tree-linked-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  color: #7b8588;
  font-size: .82rem;
  font-weight: 850;
  line-height: 1;
  transform: translateY(1px);
}

.html-preview-tree.show-linked-auto-update .html-tree-linked-icon.is-auto-update-on {
  color: #16785f;
}

.html-preview-tree.show-linked-auto-update .html-tree-linked-icon.is-auto-update-off {
  color: #7b8588;
}

.html-tree-linked-icon .flexicon {
  display: block;
  width: 20px;
  height: 20px;
}

.html-tree-linked-status {
  display: none;
  line-height: 1;
}

.html-preview-tree.show-linked-auto-update .html-tree-linked-status {
  display: inline;
}

.html-tree-meta {
  flex: 0 0 auto;
  color: #8f3e2f;
  font-size: .78rem;
  font-weight: 850;
  white-space: nowrap;
}

.html-tree-topic {
  max-width: 112px;
  padding: 2px 7px;
  overflow: hidden;
  border: 1px solid #cfdcd6;
  border-radius: 999px;
  background: #eef5f1;
  color: #1f5b4c;
  font-size: .75rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.html-tree-summary-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.html-tree-add-button {
  min-width: 88px;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid #c9beae;
  border-radius: 4px;
  background: #fffdfa;
  color: #1f5b4c;
  font: inherit;
  font-size: .78rem;
  font-weight: 850;
  line-height: 1.2;
}

.html-tree-add-button:hover,
.html-tree-add-button:focus {
  border-color: #8aa99a;
  background: #eef5f1;
  outline: 0;
}

.html-tree-children {
  display: grid;
  gap: 8px;
  padding: 8px 8px 10px 18px;
  border-top: 1px solid #eadfd2;
}

.html-tree-content {
  display: grid;
  gap: 10px;
  padding: 10px 10px 12px 24px;
  border-top: 1px solid #eadfd2;
}

.html-tree-block-actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.html-tree-block-actions form {
  margin: 0;
}

.html-tree-block-actions-standalone {
  justify-self: end;
}

.html-tree-edit-toggle {
  min-width: 78px;
  padding-inline: 8px;
}

.html-tree-edit-panel {
  border: 1px solid #e3d9ca;
  border-radius: 6px;
  background: #fffdfa;
}

.html-tree-edit-panel .html-tree-form {
  border-top: 0;
}

.html-tree-metadata {
  display: grid;
  gap: 6px;
  padding: 9px;
  border: 1px solid #d9e2dd;
  border-radius: 6px;
  background: #eef5f1;
  color: #526065;
  font-size: .82rem;
  font-weight: 750;
}

.html-tree-metadata-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.html-tree-linked-metadata {
  justify-self: start;
}

.html-tree-metadata-row > span:not(.html-tree-block-actions) {
  padding: 3px 7px;
  border: 1px solid #cfdcd6;
  border-radius: 4px;
  background: #fffdfa;
  overflow-wrap: anywhere;
}

.html-tree-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.rule-selector-dialog.flexmodal {
  border: 1px solid #d8cfc2;
}

.rule-update-dialog.flexmodal {
  border: 1px solid #d8cfc2;
}

.rule-update-dialog.flexmodal .flexmodal-content > form {
  display: grid;
  gap: 14px;
}

.rule-selector-dialog.flexmodal .flexmodal-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.rule-selector-dialog.flexmodal .flexmodal-content > form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.rule-selector-intro {
  flex: 0 0 auto;
  margin: 0 0 14px;
  color: #657176;
  font-size: .92rem;
}

.rule-selector-origin h4 {
  margin: 0;
}

.rule-selector-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid #e3d9ca;
}

.rule-selector-tab {
  margin-bottom: -1px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: #536168;
  font-weight: 750;
  cursor: pointer;
}

.rule-selector-tab:hover,
.rule-selector-tab:focus-visible {
  background: #f8f4ed;
  color: #1d2428;
}

.rule-selector-tab.active {
  border-color: #e3d9ca;
  border-bottom-color: #fffdfa;
  background: #fffdfa;
  color: #1d2428;
}

.rule-selector-panels {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.rule-selector-panel {
  display: grid;
  gap: 16px;
}

.rule-selector-origin {
  display: grid;
  gap: 8px;
}

.rule-selector-origin h4 {
  padding: 0 10px;
  color: #415057;
  font-size: .95rem;
}

.rule-selector-list {
  display: grid;
  gap: 8px;
}

.rule-selector-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 12px;
  border: 1px solid #e3d9ca;
  border-radius: 7px;
  background: #fffdfa;
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.rule-selector-row:not(.is-disabled):hover {
  border-color: #b6cfc1;
  background: #f4fbf7;
}

.rule-selector-row:focus-within {
  outline: 2px solid #8bbba4;
  outline-offset: 2px;
}

.rule-selector-row.is-selected {
  border-color: #5c9f82;
  background: #edf8f2;
  box-shadow: inset 0 0 0 1px #5c9f82;
}

.rule-selector-row.is-disabled {
  cursor: not-allowed;
  opacity: .68;
  background: #f6f2eb;
}

.rule-selector-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.rule-selector-row.is-disabled input {
  cursor: not-allowed;
}

.rule-selector-row-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rule-selector-title {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.rule-selector-meta {
  color: #657176;
  font-size: .86rem;
  overflow-wrap: anywhere;
}

.rule-selector-statuses {
  display: flex;
  justify-content: flex-end;
  min-width: 140px;
}

.rule-selector-status {
  padding: 4px 8px;
  border: 1px solid #d9e2dd;
  border-radius: 999px;
  background: #f8f4ed;
  color: #536168;
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}

.rule-selector-empty {
  padding: 16px;
  border: 1px dashed #d8cfc2;
  border-radius: 7px;
  background: #f8f4ed;
  color: #657176;
}

@media (max-width: 820px) {
  .create-workspace-start-layout {
    grid-template-columns: 1fr;
  }

  .create-workspace-start-tabs {
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    padding: 0 0 10px;
    border-right: 0;
    border-bottom: 1px solid #e1d8ca;
  }

  .create-workspace-start-tab {
    flex: 0 0 auto;
    text-align: center;
    white-space: nowrap;
  }

  .create-workspace-start-tab.active {
    box-shadow: inset 0 -3px 0 #256d5a;
  }

  .rule-selector-row {
    grid-template-columns: 1fr;
  }

  .rule-selector-row {
    align-items: flex-start;
  }

  .rule-selector-statuses {
    justify-content: flex-start;
    min-width: 0;
  }
}

.html-tree-metadata-values {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.html-tree-metadata-values > span {
  padding: 3px 7px;
  border: 1px solid #cfdcd6;
  border-radius: 4px;
  background: #fffdfa;
  overflow-wrap: anywhere;
}

.html-tree-inactive-note {
  border-color: #c8bdb0 !important;
  background: #f1eee8 !important;
  color: #5f6568;
}

.html-tree-rendered-content {
  color: #2f3d41;
  border: 1px solid #e3d9ca;
  background: #f8f4ed;
  border-radius: 6px;
  padding: 12px;
}

.html-tree-rendered-content > div {
  display: grid;
  gap: 8px;
}

.html-tree-rendered-content :where(p, ul, ol, blockquote, pre) {
  margin: 0;
}

.html-tree-rendered-content :where(ul, ol) {
  padding-left: 22px;
}

.html-tree-rendered-content :where(ul, ol) :where(ul, ol) {
  margin-top: 5px;
  padding-left: 20px;
}

.html-tree-rendered-content pre {
  white-space: pre-wrap;
}

.html-tree-form {
  margin: 0;
  padding: 10px;
  border-top: 1px solid #eadfd2;
}

.html-tree-form-errors {
  padding: 9px 10px;
  border: 1px solid #e2b6b1;
  border-radius: 6px;
  background: #fbefed;
  color: #8f3e2f;
  font-size: .86rem;
  font-weight: 800;
}

.html-tree-field-error {
  margin-top: 5px;
}

.preview-sort-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 0 2px;
  min-height: 32px;
  padding-left: 0;
}

.preview-sort-toggle .form-check-input {
  float: none;
  margin: 0;
}

.sort-info-indicator {
  color: #526065;
  font-size: .82rem;
  font-weight: 400;
  line-height: 1;
  position: relative;
  top: -1px;
}

.target-sort-tip p {
  margin: 0;
}

.target-sort-tip p + p {
  margin-top: 6px;
}

.target-path {
  margin: 4px 0 0;
  color: #526065;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: .82rem;
  overflow-wrap: anywhere;
}

.raw-output-panel {
  display: grid;
  gap: 10px;
}

.preview-tab-panel[data-preview-tab-panel="raw"] .raw-output-panel {
  min-height: 0;
  height: 100%;
}

.raw-output-label {
  margin: 0;
}

.file-write-status {
  min-height: 1.25rem;
  color: #256d5a;
  font-size: .88rem;
  font-weight: 750;
}

.file-write-status:empty {
  display: none;
}

.file-write-status.error {
  color: #9a3d35;
}

.preview-column.loading {
  opacity: .72;
}

.readable-preview section {
  margin-top: 18px;
}

.readable-preview h1,
.readable-preview h2,
.readable-preview h3,
.readable-preview h4,
.readable-preview h5,
.readable-preview h6 {
  color: #1f3033;
  font-weight: 850;
}

.markdown-heading-anchor {
  color: inherit;
  text-decoration-color: transparent;
  text-underline-offset: .16em;
  transition: color .15s ease, text-decoration-color .15s ease;
}

.markdown-heading-anchor:hover {
  color: #176b5b;
  text-decoration-color: currentColor;
}

.markdown-heading-anchor:focus-visible {
  border-radius: 3px;
  outline: 2px solid #278b78;
  outline-offset: 3px;
  text-decoration-color: currentColor;
}

.markdown-rendered-preview {
  max-width: 880px;
  padding: 18px 14px 26px;
  color: #172f3f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
  line-height: 1.62;
}

.markdown-rendered-preview > *:first-child {
  margin-top: 0;
}

.markdown-rendered-preview h1 {
  margin: 0 0 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid #dddfe2;
  color: #4a4f55;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 2.05rem;
  font-weight: 650;
  line-height: 1.18;
}

.markdown-rendered-preview h2 {
  margin: 34px 0 16px;
  color: #4a4f55;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.55rem;
  font-weight: 680;
  line-height: 1.25;
}

.markdown-rendered-preview h3 {
  margin: 28px 0 12px;
  color: #4a4f55;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.28rem;
  font-weight: 680;
  line-height: 1.3;
}

.markdown-rendered-preview h4,
.markdown-rendered-preview h5,
.markdown-rendered-preview h6 {
  margin: 22px 0 10px;
  color: #4a4f55;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.markdown-rendered-preview p,
.markdown-rendered-preview ul,
.markdown-rendered-preview ol,
.markdown-rendered-preview blockquote,
.markdown-rendered-preview pre {
  margin: 0 0 18px;
}

.markdown-rendered-preview ul,
.markdown-rendered-preview ol {
  padding-left: 28px;
}

.markdown-rendered-preview :where(ul, ol) :where(ul, ol) {
  margin: 6px 0 0;
  padding-left: 24px;
}

.markdown-rendered-preview ul ul,
.html-tree-rendered-content ul ul {
  list-style-type: circle;
}

.markdown-rendered-preview ol ol,
.html-tree-rendered-content ol ol {
  list-style-type: lower-alpha;
}

.markdown-rendered-preview blockquote {
  margin: 18px 0 22px 20px;
  padding: 13px 18px;
  border-left: 7px solid #b9bcc0;
  border-radius: 4px;
  background: #f2f2f3;
  color: #56606a;
}

.markdown-rendered-preview blockquote p {
  margin: 0;
}

.markdown-rendered-preview code {
  padding: 2px 5px;
  border-radius: 3px;
  background: #eeeeef;
  color: #4b4f55;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: .9em;
}

.markdown-rendered-preview pre {
  overflow-x: auto;
  padding: 14px 16px;
  border: 1px solid #dedfe1;
  border-radius: 4px;
  background: #f5f5f6;
  white-space: pre;
}

.markdown-rendered-preview pre code {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #25313d;
  font-size: .92rem;
}

.raw-preview {
  min-height: 420px;
  resize: vertical;
}

.preview-tab-panel[data-preview-tab-panel="raw"] .raw-preview {
  height: 100%;
  min-height: 0;
  resize: none;
}

.empty-state {
  padding: 28px;
  color: #657074;
}

@media (max-width: 1180px) {
  .template-header-stamp {
    display: none;
  }

  .cockpit,
  .template-editor-grid,
  .workspace-grid,
  .settings-grid,
  .prompt-detail-grid,
  .hero-shell,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .app-footer-inner,
  .legal-grid,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .legal-summary {
    position: static;
  }

  .support-card-primary {
    grid-template-columns: 1fr;
  }

  .support-card-primary h2,
  .support-card-primary p,
  .support-card-primary .support-note,
  .support-email {
    grid-column: auto;
    grid-row: auto;
  }

  .column-resizer {
    display: none;
  }

  .column-expand-button {
    display: none;
  }

  .agent-preview-sidekick {
    top: -34px;
    right: 18px;
    width: 96px;
  }
}

@media (max-width: 980px) {
  .rule-detail-grid {
    grid-template-columns: 1fr;
  }

  .rule-reviews-panel,
  .rule-share-panel,
  .rule-use-panel,
  .rule-versions-panel,
  .rule-delete-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .rule-use-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .rule-edit-form-grid {
    grid-template-columns: 1fr;
  }

  .rule-title-field,
  .rule-owner-move-form {
    grid-column: 1;
  }

  .rule-owner-move-form {
    grid-template-columns: 1fr;
    grid-row: auto;
  }

  .rule-owner-move-form button {
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .app-main {
    width: min(100% - 20px, 1560px);
    padding-top: 18px;
  }

  .hero-title-tools {
    white-space: normal;
  }

  .agent-preview-sidekick {
    top: -24px;
    right: 12px;
    width: 76px;
  }

  .agent-preview-stage {
    align-items: flex-start;
    flex-direction: column-reverse;
    gap: 8px;
    margin-left: 0;
  }

  .agent-preview-message {
    max-width: none;
    padding-left: 8px;
    font-size: 1.2rem;
    transform: none;
    white-space: normal;
  }

  .page-header,
  .workspace-header,
  .prompt-toolbar,
  .workspace-item,
  .prompt-list-item,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .prompt-create-button {
    margin-right: 0;
  }

  .prompt-tabs {
    width: 100%;
  }

  .prompt-tab {
    flex: 1 1 0;
  }

  .prompt-list-title-row,
  .prompt-list-detail-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .workspace-template-list-content {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .workspace-template-list-meta-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .prompt-list-actions {
    justify-content: flex-start;
  }

  .linked-workspace-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .prompt-list-stats {
    white-space: normal;
  }

  .prompt-share-grid {
    grid-template-columns: 1fr;
  }

  .prompt-feedback-grid {
    grid-template-columns: 1fr;
  }

  .prompt-share-add {
    padding-left: 0;
    border-left: 0;
  }

  .prompt-feedback-add {
    padding-left: 0;
    border-left: 0;
  }

  .workspace-title-row {
    align-items: flex-start;
  }

  .cockpit > section > .section-heading {
    padding-inline: 0;
  }

  .template-editor-grid > section > .section-heading {
    grid-template-columns: 1fr;
    padding-inline: 0;
  }

  .target-column > .section-heading {
    padding-inline: 0;
  }

  .target-column > .section-heading [data-write-all-targets] {
    align-self: flex-start;
  }

  .target-column > .section-heading > span {
    text-align: left;
  }

  .cockpit > section > .section-heading,
  .target-column > .section-heading {
    grid-template-columns: 1fr;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .invite-form {
    grid-template-columns: 1fr;
  }

  .nav-actions {
    align-items: flex-start;
    margin-top: 12px;
    white-space: normal;
  }

  .app-nav-inner {
    flex-wrap: wrap;
    gap: 8px;
    width: min(100% - 20px, 1560px);
    padding: 8px 0;
  }

  .app-nav-main {
    flex-basis: 100%;
    flex-wrap: wrap;
  }

  .app-nav-links {
    flex-wrap: wrap;
  }

  .app-header .navbar-nav {
    flex-wrap: wrap;
  }

  .app-footer-inner {
    width: min(100% - 20px, 1560px);
    gap: 22px;
  }

  .app-footer-bottom {
    flex-direction: column;
    width: min(100% - 20px, 1560px);
  }

  .legal-hero {
    padding-top: 12px;
  }
}
