.xml-app {
  --xml-editor-max-width: 1180px;
  margin: 0;
  min-height: 100vh;
  box-sizing: border-box;
  background: #f6f7f5;
  color: #202124;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.45;
  overflow-x: hidden;
}

.xml-app *,
.xml-app *::before,
.xml-app *::after {
  box-sizing: inherit;
}

.xml-app button,
.xml-app input,
.xml-app select,
.xml-app textarea {
  font: inherit;
  max-width: 100%;
}

.xml-app button {
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.xml-app button:focus-visible,
.xml-app input:focus-visible,
.xml-app select:focus-visible,
.xml-app textarea:focus-visible,
.xml-app a:focus-visible {
  outline: 3px solid rgba(47, 111, 104, 0.22);
  outline-offset: 2px;
}

.xml-app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
}

.xml-app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.85rem;
  background: #183635;
  color: #fff;
}

.xml-app-brand {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
  color: #fff;
  text-decoration: none;
}

.xml-app-brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #e5c15d;
  color: #183635;
  font-weight: 800;
}

.xml-app-brand b,
.xml-app-brand small {
  display: block;
}

.xml-app-brand small {
  color: #cbd8d2;
}

.xml-app-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.xml-app-nav button,
.xml-app-top-actions button,
.xml-app-inline-actions button,
.xml-app-panel-head button,
.xml-app-upload-row button,
.xml-app-tabs button,
.xml-app-add-btn,
.xml-app-action-panel {
  min-height: 2.4rem;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.xml-app-nav button {
  text-align: left;
  padding: 0.58rem 0.65rem;
  background: transparent;
  color: #d7e2dd;
}

.xml-app-nav button:hover,
.xml-app-nav button.is-active {
  background: #25504d;
  color: #fff;
}

.xml-app-support {
  margin-top: auto;
  display: grid;
  gap: 0.35rem;
  padding: 0.65rem;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
}

.xml-app-support small,
.xml-app-support span {
  color: #d7e2dd;
}

.xml-app-release-picker {
  display: grid;
  gap: 0.3rem;
}

.xml-app-release-picker span {
  font-size: 0.8rem;
  color: #cbd8d2;
}

.xml-app-release-picker select {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 6px;
  background: #102928;
  color: #fff;
}

.xml-app-workspace {
  min-width: 0;
  padding: 0.85rem;
}

.xml-app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin: -0.85rem -0.85rem 0.85rem;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid #d7dcd6;
  background: rgba(246, 247, 245, 0.96);
  box-shadow: 0 8px 22px rgba(31, 45, 43, 0.06);
  backdrop-filter: blur(10px);
}

.xml-app-topbar h1 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.2;
}

.xml-app-topbar p {
  margin: 0.3rem 0 0;
  color: #606960;
}

.xml-app-top-actions,
.xml-app-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  min-width: 0;
}

.xml-app-icon-btn {
  min-width: 2.4rem;
  width: 2.4rem;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-family: serif;
}

.xml-app-success {
  background: #2f6f68;
  color: #fff;
  border-color: #2f6f68;
}

.xml-app-top-actions button,
.xml-app-inline-actions button,
.xml-app-panel-head button,
.xml-app-upload-row button,
.xml-app-tabs button,
.xml-app-add-btn {
  padding: 0.55rem 0.75rem;
  background: #fff;
  color: #202124;
  border-color: #cfd6cf;
}

.xml-app-top-actions button:hover,
.xml-app-inline-actions button:hover,
.xml-app-panel-head button:hover,
.xml-app-upload-row button:hover,
.xml-app-tabs button:hover,
.xml-app-add-btn:hover {
  border-color: #7a928d;
  box-shadow: 0 3px 10px rgba(31, 45, 43, 0.08);
}

.xml-app-top-actions .xml-app-primary,
.xml-app-primary {
  background: #2f6f68;
  color: #fff;
  border-color: #2f6f68;
}

.xml-app-view-settings {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
  padding: 0.75rem;
  border: 1px solid #cfd6cf;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(31, 45, 43, 0.08);
}

.xml-app-view-settings-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.xml-app-view-settings h2 {
  margin: 0;
  color: #1d3835;
  font-size: 1rem;
}

.xml-app-view-details {
  margin-top: 0.5rem;
}

.xml-app-view-details summary {
  cursor: pointer;
  padding: 0.4rem 0.65rem;
  border: 1px solid #cfd6cf;
  border-radius: 6px;
  background: #fbfcfb;
  color: #44504a;
  font-weight: 600;
}

.xml-app-view-details summary:hover {
  background: #f5f6f5;
}

.xml-app-view-details-content {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid #e7e8e3;
}

.xml-app-view-settings p {
  margin: 0.2rem 0 0;
  color: #606960;
  font-size: 0.88rem;
}

.xml-app-view-presets,
.xml-app-view-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.xml-app-view-presets button,
.xml-app-view-settings-head button {
  min-height: 2.2rem;
  padding: 0.42rem 0.65rem;
  border: 1px solid #cfd6cf;
  border-radius: 6px;
  background: #fff;
  color: #202124;
  cursor: pointer;
}

.xml-app-view-presets button.is-active {
  border-color: #2f6f68;
  background: #e8f3ef;
  color: #1d5f58;
  font-weight: 700;
}

.xml-app-range-control {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(180px, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  color: #44504a;
  font-weight: 700;
}

.xml-app-range-control input {
  width: 100%;
  accent-color: #2f6f68;
}

.xml-app-range-control output {
  min-width: 4.5rem;
  color: #606960;
  font-weight: 600;
  text-align: right;
}

.xml-app-view-options label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.15rem;
  padding: 0.32rem 0.55rem;
  border: 1px solid #d7dcd6;
  border-radius: 999px;
  background: #fbfcfb;
  color: #44504a;
  font-size: 0.9rem;
  cursor: pointer;
}

.xml-app-view-options input {
  accent-color: #2f6f68;
}

.xml-app-status {
  margin: 0 0 1rem;
  min-height: 2.4rem;
  display: flex;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border: 1px solid #d9d2c3;
  border-radius: 6px;
  background: #fff9eb;
  color: #533d12;
  box-shadow: 0 5px 16px rgba(83, 61, 18, 0.05);
}

.xml-app-status[data-type="error"] {
  background: #fff1f1;
  border-color: #dfaaaa;
  color: #842626;
}

.xml-app-view,
.xml-app-worktab {
  display: none;
}

.xml-app-view.is-active,
.xml-app-worktab.is-active {
  display: block;
}

.xml-app-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.xml-app-action-panel {
  display: grid;
  gap: 0.35rem;
  min-height: 8rem;
  padding: 1rem;
  text-align: left;
  background: #fff;
  border-color: #d7dcd6;
  color: #202124;
}

.xml-app-action-panel span {
  font-weight: 700;
  font-size: 1.02rem;
}

.xml-app-action-panel small {
  color: #606960;
  line-height: 1.35;
}

.xml-app-action-panel:hover {
  border-color: #2f6f68;
  box-shadow: 0 10px 24px rgba(31, 45, 43, 0.08);
  transform: translateY(-1px);
}

.xml-app-panel,
.xml-app-form-panel,
.xml-app-docs-panel,
.xml-app-document-preview {
  background: #fff;
  border: 1px solid #d7dcd6;
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(31, 45, 43, 0.06);
}

.xml-app-panel {
  margin-top: 1rem;
  padding: 1rem;
}

.xml-app-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  min-width: 0;
}

.xml-app-panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.xml-app-help-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.xml-app-help-strip > div {
  padding: 0.9rem;
  border: 1px solid #d7dcd6;
  border-radius: 6px;
  background: #fbfcfb;
}

.xml-app-help-strip b,
.xml-app-help-strip span {
  display: block;
}

.xml-app-help-strip span {
  margin-top: 0.25rem;
  color: #606960;
}

.xml-app-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--xml-editor-max-width)) minmax(320px, 420px);
  gap: 0.75rem;
  align-items: start;
  justify-content: center;
}

.xml-app-editor-layout.is-docs-collapsed,
.xml-app.xml-ui-hide-document-preview .xml-app-editor-layout {
  grid-template-columns: minmax(0, 1fr);
}

.xml-app-document-picker {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(260px, 1.1fr);
  gap: 0.65rem;
  align-items: end;
  margin-bottom: 0.85rem;
  padding: 0.75rem;
  border: 1px solid #d7dcd6;
  border-radius: 8px;
  background: #f8faf8;
}

.xml-app-document-select,
.xml-app-document-search {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  font-weight: 700;
}

.xml-app-document-select span,
.xml-app-document-search span {
  color: #44504a;
  font-size: 0.88rem;
}

.xml-app-document-select select {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #cfd6cf;
  border-radius: 6px;
  background: #fff;
  color: #202124;
}

.xml-app-docs-panel {
  position: sticky;
  top: 4.8rem;
  max-height: calc(100vh - 5.6rem);
  overflow: auto;
  padding: 0.65rem;
}

.xml-app-editor-layout.is-docs-collapsed .xml-app-docs-panel {
  overflow: hidden;
}

.xml-app-editor-layout.is-docs-collapsed .xml-app-docs-panel h2,
.xml-app-editor-layout.is-docs-collapsed .xml-app-docs-panel .xml-app-search,
.xml-app-editor-layout.is-docs-collapsed .xml-app-doc-list {
  display: none;
}

.xml-app-editor-layout.is-docs-collapsed .xml-app-docs-panel .xml-app-panel-head {
  justify-content: center;
  margin-bottom: 0;
}

.xml-app-editor-layout.is-docs-collapsed #toggleDocsPanelBtn {
  width: 2.35rem;
  min-width: 2.35rem;
  min-height: 5.2rem;
  padding-inline: 0;
  overflow: hidden;
  white-space: nowrap;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.xml-app-search {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #cfd6cf;
  border-radius: 6px;
  background: #fff;
}

.xml-app-doc-list {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.6rem;
  min-width: 0;
}

.xml-app-document-picker .xml-app-doc-list {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 18rem;
  overflow: auto;
  margin-top: 0;
  padding-top: 0.15rem;
}

.xml-app-doc-group-title {
  grid-column: 1 / -1;
  margin-bottom: 0.35rem;
  color: #606960;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.xml-app-doc-item {
  width: 100%;
  display: grid;
  gap: 0.16rem;
  padding: 0.55rem 0.6rem;
  border: 1px solid #d7dcd6;
  border-left-width: 4px;
  border-left-color: transparent;
  border-radius: 6px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.xml-app-doc-item span,
.xml-app-doc-item small {
  overflow-wrap: anywhere;
}

.xml-app-doc-item small {
  color: #606960;
}

.xml-app-doc-item:hover,
.xml-app-doc-item.is-active {
  border-color: #2f6f68;
  border-left-color: #e5c15d;
  background: #eef7f4;
}

.xml-app-form-panel {
  min-width: 0;
  padding: 0.75rem;
}

.xml-app-document-preview {
  position: sticky;
  top: 4.8rem;
  min-width: 0;
  max-height: calc(100vh - 5.6rem);
  overflow: auto;
  padding: 0.75rem;
  background: #fdfdfb;
}

.xml-app-document-preview-head {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.7rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #d7dcd6;
}

.xml-app-document-preview-head h2 {
  margin: 0;
  color: #1d3835;
  font-size: 1.02rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.xml-app-document-preview-head p {
  margin: 0.22rem 0 0;
  color: #606960;
  font-size: 0.86rem;
  line-height: 1.35;
}

.xml-app-document-preview-body {
  min-width: 0;
}

.xml-app-document-sheet {
  display: grid;
  gap: 0.75rem;
  min-height: 32rem;
  padding: 1rem;
  border: 1px solid #e1dfd7;
  background: #fff;
  color: #202124;
  box-shadow: 0 10px 24px rgba(31, 45, 43, 0.08);
}

.xml-app-document-sheet-head {
  display: grid;
  gap: 0.6rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #2f6f68;
}

.xml-app-document-sheet-head h3 {
  margin: 0;
  color: #182c2a;
  font-size: 1.04rem;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.xml-app-document-meta,
.xml-app-document-rows {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.xml-app-document-meta > div,
.xml-app-document-row {
  display: grid;
  grid-template-columns: minmax(120px, 38%) minmax(0, 1fr);
  gap: 0.5rem;
  min-width: 0;
}

.xml-app-document-meta dt,
.xml-app-document-meta dd,
.xml-app-document-row dt,
.xml-app-document-row dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.xml-app-document-meta dt,
.xml-app-document-row dt {
  color: #5b665f;
  font-size: 0.82rem;
}

.xml-app-document-meta dd,
.xml-app-document-row dd {
  color: #202124;
  font-size: 0.9rem;
}

.xml-app-document-blocks {
  display: grid;
  gap: 0.75rem;
}

.xml-app-document-section {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.65rem 0 0;
  border-top: 1px solid #e7e8e3;
}

.xml-app-document-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.xml-app-document-section h4,
.xml-app-document-section h5 {
  margin: 0;
  color: #1d3835;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.xml-app-document-section h4 {
  font-size: 0.96rem;
}

.xml-app-document-section h5 {
  font-size: 0.9rem;
}

.xml-app-document-section[data-depth="1"],
.xml-app-document-section[data-depth="2"],
.xml-app-document-section[data-depth="3"] {
  padding-left: 0.65rem;
  border-left: 2px solid #edf0ec;
}

.xml-app-document-row.is-empty dd,
.xml-app-document-empty {
  color: #8a7460;
  font-style: italic;
}

.xml-app-document-empty {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.35;
}

.xml-app-document-limit {
  margin: 0;
  padding: 0.6rem 0.7rem;
  border: 1px solid #d9d2a5;
  border-radius: 6px;
  background: #fffbe6;
  color: #654d00;
  font-size: 0.88rem;
  line-height: 1.35;
}

.xml-app-schema-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid #d7dcd6;
}

.xml-app-schema-info h2 {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
}

.xml-app-schema-meta,
.xml-app-schema-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.xml-app-schema-meta span,
.xml-app-schema-links a,
.xml-app-technical-body span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  max-width: 100%;
  padding: 0.3rem 0.5rem;
  border: 1px solid #d7dcd6;
  border-radius: 6px;
  background: #fbfcfb;
  color: #202124;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.xml-app-schema-meta b,
.xml-app-technical-body b {
  margin-right: 0.2rem;
}

.xml-app-schema-links a {
  color: #1d5f58;
  text-decoration: none;
}

.xml-app-technical {
  display: none;
}

.xml-app-show-tech .xml-app-technical {
  display: block;
}

.xml-app-technical summary {
  cursor: pointer;
  color: #1d5f58;
  font-weight: 700;
}

.xml-app-technical-body {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.xml-app-tech-name {
  display: none !important;
}

.xml-app-show-tech .xml-app-tech-name {
  display: initial !important;
}

.xml-app-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #e2e6e1;
  min-width: 0;
}

.xml-app-tabs button.is-active {
  background: #2f6f68;
  border-color: #2f6f68;
  color: #fff;
}

.xml-app-segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.2rem;
  border: 1px solid #cfd6cf;
  border-radius: 6px;
  background: #f7f8f6;
}

.xml-app-segmented button {
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  border-color: transparent;
  background: transparent;
}

.xml-app-segmented button.is-active {
  background: #2f6f68;
  border-color: #2f6f68;
  color: #fff;
}

.xml-app-toggle {
  min-height: 2.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid #cfd6cf;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.xml-app-toggle input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.xml-app-toggle-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.45rem 0.65rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #202124;
  cursor: pointer;
  text-align: left;
}

.xml-app-toggle-menu:hover {
  background: #f5f6f5;
}

.xml-app-toggle-menu input {
  width: auto;
  margin: 0;
}

.xml-app-more-dropdown {
  position: relative;
}

.xml-app-dropdown-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.25rem);
  right: 0;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.35rem;
  border: 1px solid #cfd6cf;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(31, 45, 43, 0.15);
}

.xml-app-dropdown-menu button,
.xml-app-dropdown-menu label {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #202124;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}

.xml-app-dropdown-menu button:hover {
  background: #f5f6f5;
}

.xml-app-dropdown-menu button:first-child,
.xml-app-dropdown-menu label:first-child {
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}

.xml-app-dropdown-menu button:last-child,
.xml-app-dropdown-menu label:last-child {
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

.xml-app-dropdown-menu hr {
  margin: 0.25rem 0;
  border: none;
  border-top: 1px solid #e7e8e3;
}

.xml-app-upload-row {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.xml-app-form-toolbar {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  position: sticky;
  top: 4.8rem;
  z-index: 10;
  padding: 0.55rem;
  border: 1px solid #d7dcd6;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 24px rgba(31, 45, 43, 0.08);
  backdrop-filter: blur(8px);
}

.xml-app-toolbar-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
}

.xml-app-toolbar-left,
.xml-app-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.xml-app-toolbar-left {
  flex: 1;
  min-width: 0;
}

.xml-app-form-toolbar .xml-app-search {
  width: 100%;
}

.xml-app-field-actions {
  align-items: flex-start;
}

.xml-app-autosave {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  max-width: 100%;
  padding: 0.3rem 0.55rem;
  border: 1px solid #b9d2c9;
  border-radius: 999px;
  background: #eef8f4;
  color: #24553d;
  font-size: 0.86rem;
  white-space: nowrap;
}

.xml-app-autosave[data-type="error"] {
  border-color: #d69a9a;
  background: #fff1f1;
  color: #842626;
}

.xml-app-quality-panel {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
  margin: -0.25rem 0 0.75rem;
  padding: 0.65rem;
  border: 1px solid #d7dcd6;
  border-radius: 8px;
  background: #fbfcfb;
}

.xml-app-quality-meter {
  display: grid;
  gap: 0.35rem;
}

.xml-app-quality-meter strong {
  font-size: 0.95rem;
}

.xml-app-quality-track {
  height: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e1e7e2;
}

.xml-app-quality-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: #2f6f68;
  transition: width 0.18s ease;
}

.xml-app-quality-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.xml-app-quality-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.28rem 0.5rem;
  border: 1px solid #d7dcd6;
  border-radius: 6px;
  background: #fff;
  color: #44504a;
  font-size: 0.86rem;
}

.xml-app-quality-meta span[data-type="error"] {
  border-color: #d69a9a;
  background: #fff1f1;
  color: #842626;
}

.xml-app-quality-meta span[data-type="warning"] {
  border-color: #d9d2a5;
  background: #fffbe6;
  color: #654d00;
}

.xml-app-form {
  display: grid;
  gap: 0.55rem;
}

.xml-app-group,
.xml-app-repeat,
.xml-app-field {
  min-width: 0;
  border: 1px solid #d7dcd6;
  border-radius: 6px;
  background: #fff;
}

.xml-app-group:hover,
.xml-app-repeat:hover,
.xml-app-field:hover {
  border-color: #c0ccc6;
}

.xml-app-group.is-invalid,
.xml-app-repeat.is-invalid,
.xml-app-field.is-invalid {
  border-color: #c75656;
  box-shadow: 0 0 0 1px rgba(199, 86, 86, 0.16);
}

.xml-app-group.is-warning,
.xml-app-repeat.is-warning,
.xml-app-field.is-warning {
  border-color: #c0a74a;
  box-shadow: 0 0 0 1px rgba(192, 167, 74, 0.16);
}

.xml-app-field {
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem;
}

.xml-app-group,
.xml-app-repeat {
  padding: 0.65rem;
}

.xml-app-group summary {
  cursor: pointer;
  font-weight: 700;
}

.xml-app-group-body {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
  padding-left: 0.75rem;
  border-left: 2px solid #d7dcd6;
}

.xml-app-repeat-heading {
  font-weight: 700;
}

.xml-app-repeat-group {
  display: grid;
  gap: 0.6rem;
  margin: 0.65rem 0;
}

.xml-app-repeat-item {
  position: relative;
  display: grid;
  gap: 0.6rem;
  padding: 0.75rem;
  border: 1px solid #cfd6cf;
  border-radius: 6px;
  background: #fbfcfb;
}

.xml-app-repeat-item.is-collapsed > :not(.xml-app-repeat-item-actions) {
  display: none;
}

.xml-app-repeat-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.xml-app-repeat-item-actions button {
  min-height: 2rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid #cfd6cf;
  border-radius: 6px;
  background: #fff;
  color: #202124;
  cursor: pointer;
}

.xml-app-remove-btn {
  min-height: 2rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid #d69a9a;
  border-radius: 6px;
  background: #fff1f1;
  color: #842626;
  cursor: pointer;
}

.xml-app-transfer-report {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  padding: 0.75rem;
  border: 1px solid #b9d2c9;
  border-radius: 8px;
  background: #f1faf6;
  color: #1d3835;
  line-height: 1.35;
}

.xml-app-transfer-report[hidden] {
  display: none;
}

.xml-app-transfer-report summary {
  cursor: pointer;
  color: #1d5f58;
  font-weight: 700;
}

.xml-app-transfer-details {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.xml-app-transfer-details ul {
  margin: 0.3rem 0 0;
  padding-left: 1.1rem;
}

.xml-app-field label {
  display: grid;
  gap: 0.15rem;
  font-weight: 600;
}

.xml-app-field-title {
  display: grid;
  gap: 0.1rem;
  overflow-wrap: anywhere;
}

.xml-app-field-title-row {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  gap: 0.35rem;
  align-items: center;
}

.xml-app-field-title small {
  color: #6a726a;
  font-weight: 400;
}

.xml-app-help-trigger {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border: 1px solid #abc4bf;
  border-radius: 999px;
  background: #f4fbf9;
  color: #1d5f58;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  user-select: none;
}

.xml-app-help-trigger:focus {
  outline: 2px solid rgba(47, 111, 104, 0.28);
  outline-offset: 2px;
}

.xml-app-help-panel {
  position: absolute;
  z-index: 30;
  top: 1.55rem;
  left: 50%;
  display: none;
  width: min(28rem, calc(100vw - 2rem));
  max-height: min(28rem, 70vh);
  overflow: auto;
  transform: translateX(-50%);
  padding: 0.75rem;
  border: 1px solid #cfd6cf;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(26, 43, 38, 0.18);
  color: #202124;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.35;
  cursor: default;
}

.xml-app-help-trigger:hover .xml-app-help-panel,
.xml-app-help-trigger:focus .xml-app-help-panel,
.xml-app-help-trigger:focus-within .xml-app-help-panel {
  display: grid;
  gap: 0.55rem;
}

.xml-app-help-panel strong {
  color: #1d3835;
  font-size: 0.92rem;
}

.xml-app-help-row {
  display: grid;
  gap: 0.12rem;
}

.xml-app-help-row b {
  color: #4d5a55;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.xml-app-help-row span {
  overflow-wrap: anywhere;
}

.xml-app-field input,
.xml-app-field select,
.xml-app-field textarea {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #cfd6cf;
  border-radius: 6px;
  background: #fff;
  color: #202124;
  font-size: 1rem;
}

.xml-app-field input:focus,
.xml-app-field select:focus,
.xml-app-field textarea:focus,
.xml-app-search:focus,
.xml-app-code:focus {
  border-color: #2f6f68;
}

.xml-app-field textarea {
  min-height: 6.4rem;
  resize: vertical;
}

@media (min-width: 900px) {
  .xml-app-field {
    grid-template-columns: minmax(180px, 26%) minmax(0, 1fr);
    align-items: start;
  }

  .xml-app-field > label {
    grid-column: 1;
    padding-top: 0.35rem;
  }

  .xml-app-field > input,
  .xml-app-field > select,
  .xml-app-field > textarea {
    grid-column: 2;
  }

  .xml-app-field > .xml-app-hint,
  .xml-app-field > .xml-app-field-help {
    grid-column: 2;
  }

  .xml-app-field label .xml-app-help-panel {
    left: 0;
    transform: none;
  }
}

.xml-app-hint {
  color: #606960;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.xml-app-field-help {
  color: #606960;
  line-height: 1.35;
}

.xml-app-field-help summary {
  width: fit-content;
  cursor: pointer;
  color: #1d5f58;
  font-weight: 600;
}

.xml-app-field-help span {
  display: block;
  margin-top: 0.3rem;
  overflow-wrap: anywhere;
}

.xml-app-field-error {
  display: block;
  color: #842626;
  font-size: 0.88rem;
  line-height: 1.35;
}

.xml-app-code {
  width: 100%;
  min-height: 420px;
  padding: 0.75rem;
  border: 1px solid #cfd6cf;
  border-radius: 6px;
  background: #101313;
  color: #e8efec;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.45;
  resize: vertical;
  overflow: auto;
}

.xml-app-html-preview {
  max-height: 520px;
  overflow: auto;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #d7dcd6;
  border-radius: 6px;
  background: #fff;
}

.xml-app-validation-summary {
  margin-bottom: 0.65rem;
  font-weight: 700;
}

.xml-app-validation-list,
.xml-app-draft-list {
  display: grid;
  gap: 0.5rem;
}

.xml-app-note {
  margin: -0.25rem 0 0.85rem;
  color: #606960;
  font-size: 0.92rem;
}

.xml-app-issue,
.xml-app-ok,
.xml-app-list-empty {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border: 1px solid #d7dcd6;
  border-radius: 6px;
  background: #fbfcfb;
}

.xml-app-issue span,
.xml-app-ok span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.xml-app-issue-text {
  display: grid;
  gap: 0.25rem;
}

.xml-app-issue-action {
  display: block;
  color: inherit;
  font-size: 0.86rem;
  line-height: 1.35;
  opacity: 0.82;
}

.xml-app-issue button,
.xml-app-ok button {
  min-height: 2rem;
  flex: 0 0 auto;
  padding: 0.25rem 0.55rem;
  border: 1px solid #cfd6cf;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.xml-app-issue.is-error {
  border-color: #d69a9a;
  background: #fff1f1;
  color: #842626;
}

.xml-app-issue.is-warning {
  border-color: #d9d2a5;
  background: #fffbe6;
  color: #654d00;
}

.xml-app-ok {
  border-color: #a8d0bd;
  background: #effaf4;
  color: #24553d;
}

.xml-app-draft-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem;
  border: 1px solid #d7dcd6;
  border-radius: 6px;
  background: #fff;
}

.xml-app-draft-row b,
.xml-app-draft-row small {
  display: block;
  overflow-wrap: anywhere;
}

.xml-app-draft-row small {
  margin-top: 0.15rem;
  color: #606960;
}

.xml-app-file-list,
.xml-app-schema-catalog {
  display: grid;
  gap: 0.5rem;
}

.xml-app-file-row,
.xml-app-schema-row {
  display: grid;
  gap: 0.25rem;
  padding: 0.65rem;
  border: 1px solid #d7dcd6;
  border-radius: 6px;
  background: #fff;
  color: #202124;
  text-decoration: none;
}

.xml-app-file-row small,
.xml-app-schema-row small {
  color: #606960;
  overflow-wrap: anywhere;
}

.xml-app-schema-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: 0.75rem;
}

.xml-app-schema-row > div:nth-child(2) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.xml-app-schema-row span {
  padding: 0.25rem 0.45rem;
  border: 1px solid #d7dcd6;
  border-radius: 6px;
  background: #fbfcfb;
  font-size: 0.82rem;
}

.xml-app-schema-row a {
  color: #1d5f58;
}

.xml-app.xml-ui-hide-sidebar .xml-app-shell {
  grid-template-columns: minmax(0, 1fr);
}

.xml-app.xml-ui-hide-sidebar .xml-app-sidebar,
.xml-app.xml-ui-hide-status .xml-app-status,
.xml-app.xml-ui-hide-document-picker .xml-app-document-picker,
.xml-app.xml-ui-hide-schema-info .xml-app-schema-info,
.xml-app.xml-ui-hide-schema-info .xml-app-transfer-report,
.xml-app.xml-ui-hide-quality .xml-app-quality-panel,
.xml-app.xml-ui-hide-document-preview .xml-app-document-preview {
  display: none !important;
}

.xml-app.xml-ui-toolbar-static .xml-app-form-toolbar {
  position: static;
}

.xml-app.xml-ui-compact .xml-app-workspace {
  padding: 0.65rem;
}

.xml-app.xml-ui-compact .xml-app-topbar {
  margin: -0.65rem -0.65rem 0.65rem;
  padding: 0.55rem 0.65rem;
}

.xml-app.xml-ui-compact .xml-app-topbar h1 {
  font-size: 1.22rem;
}

.xml-app.xml-ui-compact .xml-app-topbar p {
  margin-top: 0.15rem;
  font-size: 0.9rem;
}

.xml-app.xml-ui-compact .xml-app-status {
  min-height: 2rem;
  margin-bottom: 0.65rem;
  padding: 0.42rem 0.6rem;
}

.xml-app.xml-ui-compact .xml-app-panel,
.xml-app.xml-ui-compact .xml-app-form-panel {
  padding: 0.55rem;
}

.xml-app.xml-ui-compact .xml-app-document-picker,
.xml-app.xml-ui-compact .xml-app-schema-info,
.xml-app.xml-ui-compact .xml-app-transfer-report,
.xml-app.xml-ui-compact .xml-app-form-toolbar,
.xml-app.xml-ui-compact .xml-app-quality-panel {
  margin-bottom: 0.55rem;
  padding: 0.5rem;
}

.xml-app.xml-ui-compact .xml-app-form,
.xml-app.xml-ui-compact .xml-app-group-body,
.xml-app.xml-ui-compact .xml-app-repeat-group,
.xml-app.xml-ui-compact .xml-app-repeat-item {
  gap: 0.42rem;
}

.xml-app.xml-ui-compact .xml-app-field,
.xml-app.xml-ui-compact .xml-app-group,
.xml-app.xml-ui-compact .xml-app-repeat,
.xml-app.xml-ui-compact .xml-app-repeat-item {
  padding: 0.48rem;
}

.xml-app.xml-ui-compact .xml-app-field input,
.xml-app.xml-ui-compact .xml-app-field select,
.xml-app.xml-ui-compact .xml-app-field textarea,
.xml-app.xml-ui-compact .xml-app-search,
.xml-app.xml-ui-compact .xml-app-document-select select {
  min-height: 2.25rem;
  padding: 0.42rem 0.55rem;
}

.xml-app.xml-ui-compact .xml-app-top-actions button,
.xml-app.xml-ui-compact .xml-app-inline-actions button,
.xml-app.xml-ui-compact .xml-app-panel-head button,
.xml-app.xml-ui-compact .xml-app-upload-row button,
.xml-app.xml-ui-compact .xml-app-tabs button,
.xml-app.xml-ui-compact .xml-app-add-btn {
  min-height: 2.15rem;
  padding: 0.42rem 0.6rem;
}

.xml-app.xml-ui-compact .xml-app-autosave,
.xml-app.xml-ui-compact .xml-app-quality-meta span {
  min-height: 1.75rem;
  font-size: 0.8rem;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .xml-app-shell {
    grid-template-columns: 1fr;
  }

  .xml-app-sidebar {
    position: static;
    height: auto;
  }

  .xml-app-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .xml-app-editor-layout,
  .xml-app-dashboard-grid,
  .xml-app-help-strip,
  .xml-app-document-picker {
    grid-template-columns: 1fr;
  }

  .xml-app-document-picker .xml-app-doc-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .xml-app-editor-layout.is-docs-collapsed {
    grid-template-columns: 1fr;
  }

  .xml-app-editor-layout.is-docs-collapsed .xml-app-docs-panel h2,
  .xml-app-editor-layout.is-docs-collapsed .xml-app-docs-panel .xml-app-search {
    display: block;
  }

  .xml-app-editor-layout.is-docs-collapsed .xml-app-doc-list {
    display: grid;
  }

  .xml-app-editor-layout.is-docs-collapsed .xml-app-docs-panel .xml-app-panel-head {
    justify-content: space-between;
    margin-bottom: 0.75rem;
  }

  .xml-app-editor-layout.is-docs-collapsed #toggleDocsPanelBtn {
    width: auto;
    min-width: 0;
    min-height: 2.4rem;
    padding-inline: 0.75rem;
    writing-mode: horizontal-tb;
  }

  .xml-app-docs-panel {
    position: static;
    max-height: none;
  }

  .xml-app-form-toolbar {
    top: 0.75rem;
  }

  .xml-app-document-preview {
    position: static;
    max-height: none;
  }
}

@media (max-width: 720px) {
  .xml-app {
    background: #fff;
  }

  .xml-app-shell {
    min-height: auto;
  }

  .xml-app-workspace,
  .xml-app-sidebar {
    padding: 0.75rem;
  }

  .xml-app-sidebar {
    gap: 0.65rem;
  }

  .xml-app-brand {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .xml-app-brand-mark {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .xml-app-support {
    display: none;
  }

  .xml-app-nav {
    display: flex;
    gap: 0.4rem;
    max-width: 100%;
    margin: 0;
    padding: 0 0 0.25rem;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .xml-app-nav button {
    flex: 0 0 auto;
    min-height: 2.35rem;
    padding: 0.55rem 0.7rem;
    white-space: nowrap;
  }

  .xml-app-topbar {
    position: static;
    margin: 0 0 0.75rem;
    padding: 0.75rem;
    border: 1px solid #d7dcd6;
    border-radius: 6px;
    box-shadow: none;
  }

  .xml-app-topbar h1 {
    font-size: 1.25rem;
  }

  .xml-app-topbar p {
    font-size: 0.94rem;
  }

  .xml-app-topbar,
  .xml-app-range-control,
  .xml-app-schema-info,
  .xml-app-form-toolbar,
  .xml-app-document-picker,
  .xml-app-upload-row,
  .xml-app-draft-row,
  .xml-app-schema-row {
    grid-template-columns: 1fr;
  }

  .xml-app-top-actions,
  .xml-app-inline-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .xml-app-view-settings {
    padding: 0.65rem;
  }

  .xml-app-view-settings-head {
    align-items: stretch;
    flex-direction: column;
  }

  .xml-app-range-control {
    gap: 0.35rem;
  }

  .xml-app-range-control output {
    text-align: left;
  }

  .xml-app-top-actions button,
  .xml-app-inline-actions button,
  .xml-app-panel-head button,
  .xml-app-upload-row button,
  .xml-app-add-btn {
    width: 100%;
  }

  .xml-app-icon-btn {
    width: auto;
    min-width: auto;
    padding: 0.55rem 0.75rem;
  }

  .xml-app-dropdown-menu {
    position: fixed;
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    min-width: 0;
    max-height: 70vh;
    overflow: auto;
    border-radius: 16px 16px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }

  .xml-app-dropdown-menu button,
  .xml-app-dropdown-menu label {
    padding: 0.75rem 0.85rem;
  }

  .xml-app-dashboard-grid {
    gap: 0.6rem;
  }

  .xml-app-action-panel {
    min-height: 5.75rem;
    padding: 0.8rem;
  }

  .xml-app-panel,
  .xml-app-form-panel,
  .xml-app-docs-panel,
  .xml-app-document-preview {
    border-radius: 6px;
    box-shadow: none;
  }

  .xml-app-panel,
  .xml-app-form-panel,
  .xml-app-document-preview {
  width: 100%;
  max-width: var(--xml-editor-max-width);
  margin-inline: auto;
  padding: 0.75rem;
}

  .xml-app-document-sheet {
    min-height: 20rem;
    padding: 0.8rem;
    box-shadow: none;
  }

  .xml-app-document-meta > div,
  .xml-app-document-row {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .xml-app-doc-list {
    max-height: 42vh;
    overflow: auto;
    padding-right: 0.15rem;
  }

  .xml-app-document-picker .xml-app-doc-list {
    grid-template-columns: 1fr;
    max-height: 16rem;
  }

  .xml-app-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .xml-app-tabs button {
    width: 100%;
  }

  .xml-app-form-toolbar {
    position: static;
    padding: 0.6rem;
    box-shadow: none;
  }

  .xml-app-toolbar-main {
    flex-direction: column;
    align-items: stretch;
  }

  .xml-app-toolbar-left,
  .xml-app-toolbar-right {
    justify-content: center;
  }

  .xml-app-toolbar-left {
    order: 2;
    width: 100%;
  }

  .xml-app-toolbar-right {
    order: 1;
    width: 100%;
  }

  .xml-app-form-toolbar .xml-app-search,
  .xml-app-form-toolbar .xml-app-segmented,
  .xml-app-form-toolbar .xml-app-autosave,
  .xml-app-quality-panel {
    grid-column: 1 / -1;
  }

  .xml-app-quality-panel {
    grid-template-columns: 1fr;
  }

  .xml-app-form-toolbar .xml-app-inline-actions {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 0.1rem;
    scrollbar-width: thin;
  }

  .xml-app-form-toolbar .xml-app-inline-actions button,
  .xml-app-form-toolbar .xml-app-inline-actions .xml-app-toggle,
  .xml-app-form-toolbar .xml-app-inline-actions .xml-app-autosave,
  .xml-app-form-toolbar .xml-app-inline-actions .xml-app-segmented {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }

  .xml-app-segmented {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .xml-app-segmented button {
    width: 100%;
    padding: 0.35rem 0.35rem;
    font-size: 0.9rem;
  }

  .xml-app-group,
  .xml-app-repeat,
  .xml-app-field {
    border-radius: 6px;
  }

  .xml-app-group,
  .xml-app-repeat,
  .xml-app-field,
  .xml-app-repeat-item {
    padding: 0.65rem;
  }

  .xml-app-group-body {
    padding-left: 0.55rem;
  }

  .xml-app-issue,
  .xml-app-ok,
  .xml-app-list-empty {
    flex-direction: column;
    align-items: stretch;
  }

  .xml-app-issue button,
  .xml-app-ok button {
    width: 100%;
  }

  .xml-app-code {
    min-height: 280px;
    font-size: 0.78rem;
  }

  .xml-app-autosave {
    justify-content: center;
    white-space: normal;
  }
}

@media (max-width: 460px) {
  .xml-app-workspace,
  .xml-app-sidebar {
    padding: 0.6rem;
  }

  .xml-app-top-actions,
  .xml-app-inline-actions,
  .xml-app-tabs {
    grid-template-columns: 1fr;
  }

  .xml-app-segmented {
    grid-template-columns: 1fr;
  }

  .xml-app-topbar h1 {
    font-size: 1.15rem;
  }

  .xml-app-panel-head {
    align-items: stretch;
    flex-direction: column;
  }
}
