:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  color: #17202a;
  background: #f5f7fa;
}

/* Shared controls and login */

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #f5f7fa;
}

a {
  color: inherit;
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.button,
button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  color: #ffffff;
  background: #0f6b74;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.link-button {
  min-height: auto;
  padding: 0;
  color: #17202a;
  background: transparent;
  font-weight: 400;
}

.auth-layout {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 56px min(5vw, 40px);
}

.login-form h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
}

.eyebrow {
  margin: 0 0 10px;
  color: #0f6b74;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-form {
  border: 1px solid #dde4ed;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(31, 44, 58, 0.08);
}

.auth-layout {
  display: grid;
  place-items: center;
}

.login-form {
  width: min(420px, 100%);
  padding: 30px;
}

.login-form label {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  color: #415064;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c9d3df;
  border-radius: 6px;
  padding: 0 12px;
  background: #ffffff;
  font: inherit;
}

select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c9d3df;
  border-radius: 6px;
  padding: 0 12px;
  background: #ffffff;
  font: inherit;
}

.form-error {
  display: none;
  margin: 0 0 16px;
  color: #a23333;
}

.form-error.visible {
  display: block;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  vertical-align: top;
}

th {
  color: #536274;
  background: #f9fbfd;
  font-size: 0.82rem;
}

td span {
  display: block;
  margin-top: 5px;
  color: #697789;
  font-size: 0.9rem;
}

code {
  border-radius: 4px;
  padding: 2px 5px;
  background: #eef3f7;
}

.panel-head p {
  color: #657386;
  font-size: 0.82rem;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #edf1f5;
}

.panel-head h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.panel-head p {
  margin: 0;
}

.quiet-button {
  min-height: 36px;
  color: #0f6b74;
  background: #e8f4f5;
}

/* Public website */

body.landing-page {
  color: var(--landing-text, #e6eef8);
  background:
    radial-gradient(circle at 15% 0%, rgba(38, 166, 154, 0.12), transparent 32rem),
    linear-gradient(180deg, var(--landing-bg-top, #07111f) 0%, #0a1220 42%, var(--landing-bg-bottom, #0d1320) 100%);
}

.landing-page a {
  color: inherit;
}

.landing-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px min(4vw, 56px);
  border-bottom: 1px solid rgba(141, 160, 184, 0.18);
  background: rgba(7, 17, 31, 0.88);
  backdrop-filter: blur(16px);
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f7fbff;
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(74, 222, 222, 0.5);
  border-radius: 7px;
  color: var(--landing-accent, #99f6e4);
  background: rgba(20, 184, 166, 0.12);
}

.brand-logo {
  display: block;
  width: auto;
  max-width: 144px;
  max-height: 36px;
  object-fit: contain;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #b7c5d8;
  font-size: 0.95rem;
}

.landing-nav a:hover,
.landing-footer a:hover,
.landing-footer button:hover {
  color: #ffffff;
}

.language-switcher {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(141, 160, 184, 0.2);
  border-radius: 7px;
  background: rgba(13, 23, 38, 0.85);
}

.language-switcher button,
.landing-footer button {
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  padding: 0 10px;
  color: #9fb0c5;
  background: transparent;
  font: inherit;
  font-weight: 800;
}

.language-switcher button[aria-pressed="true"],
.landing-footer button[aria-pressed="true"] {
  color: var(--landing-accent-dark, #06211e);
  background: var(--landing-accent, #5eead4);
}

.landing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid rgba(94, 234, 212, 0.55);
  border-radius: 7px;
  padding: 0 18px;
  color: #031513;
  background: #7ff7e4;
  font-weight: 900;
  text-decoration: none;
}

.landing-button.small {
  min-height: 38px;
  border-color: rgba(127, 247, 228, 0.9);
  box-shadow: 0 0 0 1px rgba(3, 21, 19, 0.2);
}

.landing-button.secondary {
  color: #d9f7f2;
  background: rgba(94, 234, 212, 0.08);
}

.landing-hero,
.feature-section {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 44px min(4vw, 40px);
}

.landing-hero {
  display: block;
  min-height: 0;
}

.hero-content h1 {
  margin: 0 0 14px;
  max-width: 780px;
  color: #ffffff;
  font-size: clamp(2.3rem, 5vw, 4.7rem);
  line-height: 1;
}

.hero-subtitle {
  max-width: 680px;
  margin: 0;
  color: #aec0d4;
  font-size: 1.04rem;
  line-height: 1.55;
}

.landing-eyebrow {
  margin: 0 0 10px;
  color: var(--landing-accent, #5eead4);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.feature-card {
  border: 1px solid rgba(141, 160, 184, 0.18);
  border-radius: 8px;
  background: var(--landing-surface, rgba(13, 23, 38, 0.82));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.04;
}

.section-heading p:not(.landing-eyebrow) {
  color: #aebed1;
  line-height: 1.7;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(var(--feature-columns, 5), 1fr);
  gap: 14px;
}

.feature-card {
  padding: 22px;
}

.feature-card span {
  color: var(--landing-accent, #5eead4);
  font-weight: 900;
}

.feature-card h3 {
  margin: 18px 0 10px;
  color: #ffffff;
}

.feature-card p,
.landing-footer p {
  margin: 0;
  color: #aebed1;
  line-height: 1.6;
}

.landing-footer {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 2fr;
  gap: 28px;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 36px min(4vw, 40px) 46px;
  border-top: 1px solid rgba(141, 160, 184, 0.18);
}

.landing-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  color: #aebed1;
}

@media (max-width: 1020px) {
  .landing-hero,
  .feature-grid,
  .landing-footer {
    grid-template-columns: 1fr 1fr;
  }

  .landing-hero {
    min-height: auto;
  }
}

.landing-hero[data-layout="wide-copy"] {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.landing-hero[data-layout="wide-preview"] {
  grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1.2fr);
}

.content-shell {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 76px min(5vw, 40px);
}

.content-shell h1 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1;
}

.content-intro {
  max-width: 760px;
  margin: 0 0 28px;
  color: var(--landing-muted, #aebed1);
  font-size: 1.18rem;
  line-height: 1.75;
}

.content-body {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--landing-border, rgba(141, 160, 184, 0.18));
  border-radius: 8px;
  background: var(--landing-surface, rgba(13, 23, 38, 0.82));
}

.content-body p {
  margin: 0;
  color: #d9e5f2;
  line-height: 1.75;
}

.content-body h2,
.content-body h3 {
  margin: 10px 0 0;
  color: #ffffff;
}

.content-body ul,
.content-body ol {
  margin: 0;
  padding-left: 22px;
  color: #d9e5f2;
  line-height: 1.75;
}

.content-body a {
  color: var(--landing-accent, #5eead4);
  font-weight: 800;
}

.editor-page {
  color: #17202a;
  background: #eef3f7;
}

.editor-layout {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 32px min(4vw, 36px);
}

.editor-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.editor-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.editor-hero p:not(.eyebrow) {
  max-width: 780px;
  margin: 0;
  color: #526174;
  line-height: 1.65;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.danger-button {
  color: #ffffff;
  background: #a83b3b;
}

.editor-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.editor-panel {
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(31, 44, 58, 0.08);
}

.editor-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.editor-panel h2 {
  margin: 0;
  font-size: 1.18rem;
}

.editor-panel label {
  display: grid;
  gap: 7px;
  color: #415064;
  font-weight: 700;
}

.editor-toggles {
  display: grid;
  gap: 10px;
}

.editor-toggles label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-toggles input {
  width: 18px;
  min-height: 18px;
}

.editor-json-panel {
  min-height: 72vh;
}

.editor-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.editor-panel-head p {
  max-width: 760px;
  margin: 8px 0 0;
  color: #5f6f82;
  line-height: 1.55;
}

#saveStatus {
  min-width: 180px;
  border-radius: 999px;
  padding: 8px 12px;
  color: #526174;
  background: #edf3f8;
  font-size: 0.86rem;
  text-align: center;
}

#saveStatus[data-type="ok"] {
  color: #0f5132;
  background: #dff4e8;
}

#saveStatus[data-type="error"] {
  color: #842029;
  background: #f8d7da;
}

#contentJson {
  width: 100%;
  min-height: 64vh;
  resize: vertical;
  border: 1px solid #c9d3df;
  border-radius: 8px;
  padding: 16px;
  color: #d7e3f4;
  background: #0d1726;
  font-family: Consolas, Monaco, monospace;
  font-size: 0.9rem;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .editor-hero,
  .editor-grid,
  .editor-panel-head {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .editor-actions {
    justify-content: flex-start;
  }
}

/* Website content editor */

.cms-shell {
  width: min(2600px, 100%);
  margin: 0 auto;
  padding: 28px min(3vw, 32px) 48px;
}

.cms-topbar,
.cms-toolbar,
.cms-tab-panel,
.cms-section,
.cms-json-head {
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(31, 44, 58, 0.07);
}

.cms-topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  margin-bottom: 16px;
}

.cms-topbar h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.cms-topbar p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: #536274;
  line-height: 1.6;
}

.cms-actions,
.cms-toolbar-controls,
.cms-tabs,
.cms-language,
.cms-item-actions,
.cms-repeatable-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cms-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cms-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  margin-bottom: 16px;
}

.cms-tabs,
.cms-language {
  padding: 4px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #f5f8fb;
}

.cms-tabs button,
.cms-language button,
.cms-section-nav button,
.cms-item-actions button,
.cms-repeatable-head button,
.cms-json-head button {
  min-height: 34px;
  border-radius: 6px;
  padding: 0 12px;
  color: #385066;
  background: transparent;
  font-weight: 800;
}

.cms-tabs button.active,
.cms-language button.active,
.cms-section-nav button.active {
  color: #ffffff;
  background: #0f6b74;
}

.cms-search {
  display: grid;
  gap: 4px;
  min-width: min(320px, 42vw);
  color: #536274;
  font-size: 0.82rem;
  font-weight: 800;
}

.cms-inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #536274;
  font-weight: 800;
}

.cms-inline-check input {
  width: 18px;
  min-height: 18px;
}

.cms-tab-panel {
  display: none;
  padding: 16px;
}

.cms-tab-panel.active {
  display: block;
}

.cms-tab-panel[data-panel="editor"] {
  grid-template-columns: 220px minmax(520px, 1fr);
  gap: 12px;
  align-items: start;
}

.cms-tab-panel[data-panel="editor"].active {
  display: grid;
}

.cms-section-nav {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #f8fbfd;
}

.cms-section-nav button {
  justify-content: flex-start;
  text-align: left;
}

.cms-section {
  display: none;
  padding: 22px;
}

.cms-section.active {
  display: block;
}

.cms-panel-head {
  margin-bottom: 20px;
}

.cms-panel-head h2,
.cms-json-head h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
}

.cms-panel-head p,
.cms-json-head p {
  margin: 0;
  color: #617186;
  line-height: 1.55;
}

.cms-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.cms-field {
  display: grid;
  gap: 7px;
  color: #415064;
  font-weight: 800;
}

.cms-field small,
.cms-translation-pair small {
  color: #728196;
  font-weight: 700;
}

.cms-field textarea,
.cms-translation-pair textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #c9d3df;
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
}

.cms-translation-pair {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 160px repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid #e0e7ef;
  border-radius: 8px;
  background: #f9fbfd;
}

.cms-translation-pair > span {
  color: #415064;
  font-weight: 900;
}

.cms-translation-pair label {
  display: grid;
  gap: 7px;
}

.cms-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cms-check input {
  width: 18px;
  min-height: 18px;
}

.cms-repeatable-head {
  justify-content: space-between;
  margin: 24px 0 12px;
}

.cms-repeatable-head h3,
.cms-repeatable-head h4 {
  margin: 0;
}

.cms-repeatable-list {
  display: grid;
  gap: 12px;
}

.cms-repeatable-item,
.cms-page-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #fbfcfe;
}

.cms-repeatable-item.compact {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.cms-item-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cms-item-actions button {
  min-height: 30px;
  background: #edf4f7;
}

.cms-nested-editor {
  margin-top: 24px;
}

.cms-subsection {
  padding: 16px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #f8fbfd;
}

.cms-subsection h3 {
  margin: 0 0 14px;
}

.cms-table-editor {
  overflow-x: auto;
}

.cms-table-editor table {
  min-width: 900px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  overflow: hidden;
}

.cms-table-editor th,
.cms-table-editor td {
  background: #ffffff;
}

.cms-table-editor td:first-child {
  min-width: 260px;
}

.cms-table-translation {
  display: grid;
  gap: 8px;
  min-width: 180px;
}

.cms-rich-editor {
  display: grid;
  gap: 8px;
}

.cms-rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cms-rich-toolbar button {
  min-height: 30px;
  padding: 0 10px;
  color: #385066;
  background: #edf4f7;
}

.cms-asset-field {
  align-content: start;
}

.cms-asset-field img,
.cms-asset-empty {
  width: 100%;
  min-height: 112px;
  max-height: 180px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #f8fbfd;
}

.cms-asset-field img {
  padding: 12px;
  object-fit: contain;
}

.cms-asset-empty {
  display: grid;
  place-items: center;
  color: #728196;
  font-weight: 800;
}

.cms-pages-editor {
  display: grid;
  gap: 16px;
}

.cms-json-head {
  justify-content: space-between;
  padding: 18px;
  margin-bottom: 16px;
}

.cms-validation {
  margin-top: 12px;
  border-radius: 8px;
  padding: 14px;
  background: #edf3f8;
  color: #526174;
}

.cms-validation[data-type="ok"] {
  color: #0f5132;
  background: #dff4e8;
}

.cms-validation[data-type="error"] {
  color: #842029;
  background: #f8d7da;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.dashboard-grid article {
  min-height: 62px;
  padding: 10px;
  border: 1px solid #dfe7ef;
  border-radius: 6px;
  background: #fbfcfe;
}

.dashboard-grid span {
  display: block;
  color: #657386;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 1.05rem;
}

/* Admin dashboard */

.dashboard-shell {
  width: min(3200px, 100%);
  margin: 0 auto;
  padding: 10px clamp(14px, 1.4vw, 34px) 48px;
}

.dashboard-hero,
.dashboard-panel {
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(31, 44, 58, 0.07);
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 8px;
}

.dashboard-hero h1 {
  margin: 0 0 4px;
  font-size: clamp(1.4rem, 2vw, 2.1rem);
}

.dashboard-hero p:not(.eyebrow) {
  margin: 0;
  color: #536274;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.admin-section-nav {
  position: sticky;
  top: 46px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 0 8px;
  background: #eef5f9;
}

.admin-section-nav a,
.admin-section-nav button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid #c8d8e4;
  border-radius: 7px;
  padding: 0 10px;
  color: #23364d;
  background: #ffffff;
  font-weight: 900;
  text-decoration: none;
}

.admin-section-nav a:hover,
.admin-section-nav button:hover {
  border-color: #0f7480;
  color: #075f69;
}

.admin-section-nav button[aria-pressed="true"] {
  border-color: #0f7480;
  color: #ffffff;
  background: #0f7480;
}

.admin-section-panel {
  display: none;
  margin-bottom: 0;
}

.admin-section-panel.active {
  display: block;
}

.dashboard-grid {
  padding: 0 10px 10px;
}

.dashboard-panel {
  overflow: hidden;
}

.dashboard-users {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
}

.role-manager {
  padding-top: 0;
}

.roles-help {
  display: grid;
  gap: 4px;
  margin: 10px 10px 0;
  border: 1px solid #dfe7ef;
  border-radius: 6px;
  padding: 8px;
  color: #526174;
  background: #fbfcfe;
  font-size: 0.82rem;
}

.roles-help strong {
  color: #17202a;
}

.role-layout-editor {
  display: grid;
  gap: 6px;
  margin: 0;
  border: 1px solid #d7e0ea;
  border-radius: 6px;
  padding: 7px;
  background: #fbfcfe;
}

.role-layout-editor legend {
  padding: 0 4px;
  color: #0f6b74;
  font-size: 0.78rem;
  font-weight: 900;
}

.role-layout-editor p,
.role-layout-editor small {
  margin: 0;
  color: #526174;
  font-size: 0.78rem;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 4px;
  margin-top: 4px;
}

.permission-grid span {
  display: grid;
  gap: 2px;
  border: 1px solid #e0e7ef;
  border-radius: 4px;
  padding: 5px 6px;
  background: #ffffff;
}

.permission-grid b {
  color: #415064;
  font-size: 0.76rem;
}

.dashboard-import {
  display: grid;
  grid-template-columns: minmax(310px, 420px) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px;
}

.import-wizard-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
}

.import-wizard-steps li {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  border: 1px solid #dce7ee;
  border-radius: 5px;
  padding: 3px 6px;
  color: #526174;
  background: #fbfdff;
  font-size: 0.72rem;
  font-weight: 900;
}

.import-wizard-steps span {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #0f6b74;
  background: #e7f5f7;
  font-size: 0.68rem;
}

.import-wizard-steps li.active {
  border-color: #0f6b74;
  color: #0f6b74;
  background: #edf8fa;
}

.import-wizard-steps li.complete span {
  color: #ffffff;
  background: #0f6b74;
}

.parser-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
}

.parser-panel {
  min-width: 0;
}

.parser-panel h3 {
  margin: 0 0 8px;
}

.parser-help {
  margin: -2px 0 8px;
  color: #526174;
  font-size: 0.88rem;
  line-height: 1.45;
}

.parser-controls,
.parser-profile-form {
  display: grid;
  gap: 8px;
}

.parser-controls {
  grid-template-columns: minmax(240px, 1.15fr) minmax(110px, 0.4fr) repeat(2, minmax(180px, 0.8fr)) repeat(3, auto);
  align-items: end;
}

.parser-controls label,
.parser-profile-form label {
  display: grid;
  gap: 4px;
  color: #415064;
  font-weight: 800;
}

.parser-controls small {
  color: #657386;
  font-size: 0.76rem;
  font-weight: 700;
}

.parser-rules-panel {
  display: grid;
  align-content: start;
}

.parser-rule-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}

.parser-rule-summary div {
  min-width: 0;
  border: 1px solid #dfe7ef;
  border-radius: 6px;
  padding: 7px 8px;
  background: #fbfcfe;
}

.parser-rule-summary span {
  display: block;
  color: #657386;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.parser-rule-summary strong {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #17202a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.parser-rule-summary .parser-rule-examples {
  grid-column: 1 / -1;
}

.parser-config-field textarea {
  min-height: 300px;
  resize: vertical;
  border: 1px solid #c9d3df;
  border-radius: 6px;
  padding: 8px;
  font: 0.86rem/1.45 Consolas, "Liberation Mono", monospace;
}

.parser-config-field.collapsed {
  display: none;
}

.parser-json-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #657386;
  font-size: 0.76rem;
  font-weight: 800;
}

.parser-rule-tools {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0;
  color: #526174;
  font-size: 0.78rem;
}

.parser-rule-tools strong {
  color: #17202a;
  font-size: 0.88rem;
}

.parser-mapping-table input,
.parser-mapping-table select,
.parser-add-rule input,
.parser-add-rule select {
  width: 100%;
  min-height: 28px;
  border: 1px solid #c9d3df;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 0.78rem;
}

.parser-mapping-table th,
.parser-mapping-table td {
  padding: 3px 5px;
}

.parser-add-rule {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) 100px auto;
  gap: 5px;
  margin-top: 6px;
}

.parser-profile-history {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  border-top: 1px solid #edf2f6;
  padding-top: 8px;
}

.parser-profile-history h4,
.parser-profile-history p {
  margin: 0;
}

.parser-profile-history p {
  color: #657386;
  font-size: 0.76rem;
}

.parser-profile-history article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #dfe7ef;
  border-radius: 5px;
  padding: 5px 7px;
  background: #fbfdff;
}

.parser-profile-history article div {
  display: grid;
  min-width: 0;
}

.parser-profile-history span {
  overflow: hidden;
  color: #657386;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attribute-dictionary-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid #edf2f6;
}

.attribute-dictionary-tools input {
  min-height: 32px;
  border: 1px solid #c9d3df;
  border-radius: 5px;
  padding: 4px 8px;
}

.attribute-dictionary-tools span {
  color: #526174;
  font-size: 0.78rem;
  font-weight: 900;
}

.attribute-dictionary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 8px;
  padding: 8px 10px 10px;
}

.attribute-dictionary-section {
  min-width: 0;
  border: 1px solid #dfe7ef;
  border-radius: 6px;
  padding: 6px;
  background: #fbfdff;
}

.attribute-dictionary-section h3 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 5px;
  color: #0f6b74;
  font-size: 0.82rem;
}

.attribute-dictionary-section > div {
  display: grid;
  gap: 2px;
  max-height: 340px;
  overflow: auto;
}

.attribute-dictionary-section article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 8px;
  border-bottom: 1px solid #edf2f6;
  padding: 3px 0;
}

.attribute-dictionary-section strong,
.attribute-dictionary-section span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attribute-dictionary-section span {
  color: #657386;
  font-size: 0.7rem;
}

.attribute-dictionary-section em {
  grid-row: span 2;
  align-self: center;
  color: #526174;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.parser-preview {
  margin-top: 8px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  padding: 8px;
  background: #fbfcfe;
  color: #526174;
}

.parser-preview-head {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.parser-preview-head div {
  min-width: 0;
  border: 1px solid #edf1f5;
  border-radius: 6px;
  padding: 8px;
  background: #ffffff;
}

.parser-preview-head span {
  display: block;
  color: #657386;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.parser-preview-head strong {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: #17202a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.parser-preview h4 {
  margin: 10px 0 6px;
  color: #17202a;
}

.import-preview-panel {
  display: grid;
  gap: 8px;
}

.import-preview-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.import-preview-head h3,
.import-preview-head p {
  margin: 0;
}

.import-preview-head p {
  color: #657386;
  font-size: 0.82rem;
}

.import-preview-table tr.active td {
  background: #eef9fb;
}

.import-preview-table .link-button {
  min-height: 0;
  padding: 0;
  color: #0f6b74;
  background: transparent;
  font-weight: 900;
  text-align: left;
}

.import-error {
  color: #842029;
  font-weight: 900;
}

.parser-table-wrap {
  max-height: 420px;
  overflow: auto;
  border: 1px solid #edf1f5;
  border-radius: 6px;
  background: #ffffff;
}

.parser-table-wrap.compact {
  max-height: 260px;
}

.import-run-table td:nth-child(5) {
  min-width: 230px;
}

.import-run-table td:nth-child(5) strong,
.import-run-table td:nth-child(5) span,
.import-run-table td:nth-child(5) small {
  display: block;
}

.import-run-table td:nth-child(5) span,
.import-run-table td:nth-child(5) small {
  margin-top: 2px;
  color: #657386;
  font-size: 0.7rem;
}

.data-quality-panel,
.audit-log-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.quality-help,
.quality-rule-form {
  margin: 10px;
  border: 1px solid #dfe7ef;
  border-radius: 6px;
  padding: 8px;
  background: #fbfcfe;
}

.quality-help {
  display: grid;
  gap: 4px;
  color: #526174;
  font-size: 0.82rem;
}

.quality-help strong {
  color: #17202a;
}

.quality-rule-form {
  display: grid;
  grid-template-columns: minmax(140px, 0.9fr) minmax(150px, 0.75fr) minmax(130px, 0.65fr) minmax(120px, 0.65fr) minmax(180px, 1.1fr) minmax(110px, 0.55fr) auto auto auto;
  gap: 6px;
  align-items: end;
}

.quality-rule-form label {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: #415064;
  font-size: 0.74rem;
  font-weight: 900;
}

.quality-rule-form input,
.quality-rule-form select {
  min-height: 30px;
  padding: 3px 7px;
  font-size: 0.78rem;
}

.quality-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.quality-summary article,
.quality-row,
.audit-row {
  border: 1px solid #dfe7ef;
  border-radius: 6px;
  padding: 10px;
  background: #fbfcfe;
}

.quality-summary span,
.audit-row small {
  color: #657386;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.quality-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 1.2rem;
}

.quality-list,
.quality-rules-list,
.audit-log-panel {
  display: grid;
  gap: 6px;
}

.quality-row,
.quality-rule-row,
.audit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quality-row div,
.quality-rule-row div,
.audit-row div {
  min-width: 0;
}

.quality-row strong,
.quality-rule-row strong,
.audit-row strong {
  display: block;
}

.quality-row span,
.quality-rule-row span,
.audit-row span {
  display: block;
  overflow: hidden;
  color: #526174;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-row small {
  display: block;
  color: #a15c12;
  font-weight: 800;
}

.audit-log-panel {
  min-width: 0;
  padding: 8px 10px 10px;
  overflow-x: hidden;
  font-size: 0.82rem;
}

.audit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 8px;
}

.audit-row strong {
  color: #17202a;
  font-size: 0.82rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.audit-row span {
  overflow: visible;
  color: #526174;
  font-size: 0.78rem;
  line-height: 1.35;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.audit-row small {
  justify-self: end;
  max-width: 260px;
  color: #657386;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: right;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
}

.quality-rule-row {
  border: 1px solid #dfe7ef;
  border-radius: 6px;
  padding: 8px;
  background: #ffffff;
}

.quality-rule-row small {
  display: block;
  color: #657386;
  font-weight: 800;
}

.parser-table {
  width: 100%;
  min-width: 920px;
}

.parser-table th,
.parser-table td {
  padding: 6px 8px;
  vertical-align: top;
}

.dashboard-user-form,
.dashboard-import-form {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
}

.dashboard-user-form label,
.dashboard-import-form label,
.dashboard-upload-field {
  display: grid;
  gap: 7px;
  color: #415064;
  font-weight: 800;
}

.dashboard-upload-field {
  position: relative;
  min-width: 0;
}

.dashboard-upload-field input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}

.dashboard-upload-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid #c9d3df;
  border-radius: 6px;
  padding: 8px;
  background: #ffffff;
}

.dashboard-upload-control button {
  flex: 0 0 auto;
}

.dashboard-upload-control strong {
  min-width: 0;
  overflow: hidden;
  color: #2d3e52;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-upload-field small,
.dashboard-import-form label small {
  color: #657386;
  font-weight: 600;
  line-height: 1.45;
}

.dashboard-user-list {
  display: grid;
  gap: 10px;
}

.dashboard-import-status,
.dashboard-import-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.dashboard-import-status > div:first-child {
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  padding: 12px;
  color: #526174;
  background: #fbfcfe;
  font-weight: 800;
}

.dashboard-import-list h3 {
  margin: 8px 0 0;
  font-size: 1rem;
}

.import-health-panel {
  display: grid;
  gap: 8px;
  border: 1px solid #d8e4ed;
  border-radius: 6px;
  padding: 8px;
  background: #fbfdff;
  color: #21354b;
}

.import-health-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.import-health-head h3 {
  margin: 0 0 2px;
  font-size: 0.95rem;
}

.import-health-head p {
  margin: 0;
  color: #657386;
  font-size: 0.74rem;
}

.import-health-head > strong {
  flex: 0 0 auto;
  border-radius: 5px;
  padding: 3px 7px;
  color: #0f6b74;
  background: #edf8fa;
  font-size: 0.74rem;
}

.import-health-head > strong.is-warning,
.import-health-grid article.is-warning {
  color: #8a4a00;
  background: #fff6e7;
}

.import-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 5px;
}

.import-health-grid article {
  display: grid;
  gap: 2px;
  border: 1px solid #e0e7ef;
  border-radius: 5px;
  padding: 6px;
  background: #ffffff;
}

.import-health-grid span,
.import-health-grid small {
  color: #657386;
  font-size: 0.66rem;
  font-weight: 800;
}

.import-health-grid strong {
  color: #1a2a3d;
  font-size: 1rem;
}

.import-health-tags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.import-health-tags > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  border: 1px solid #e0e7ef;
  border-radius: 5px;
  padding: 5px;
  background: #ffffff;
}

.import-health-tags strong,
.import-health-tags span {
  font-size: 0.7rem;
}

.import-health-tags span {
  border: 1px solid #d5e7ec;
  border-radius: 4px;
  padding: 1px 5px;
  color: #526174;
  background: #f7fbfc;
}

.import-health-runs {
  min-width: 680px;
}

.dashboard-user-row,
.dashboard-import-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #fbfcfe;
}

.dashboard-user-row > div,
.dashboard-import-row > div {
  min-width: 0;
}

.dashboard-import-row strong,
.dashboard-import-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-user-row span,
.dashboard-user-row small,
.dashboard-import-row span,
.dashboard-import-row small {
  display: block;
  margin-top: 4px;
  color: #657386;
}

.dashboard-import-row a {
  flex: 0 0 auto;
  color: #0f6b74;
  font-weight: 900;
}

.dashboard-import-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.dashboard-import-actions button {
  min-height: 26px;
  padding: 0 8px;
}

.import-run-detail {
  margin-top: -6px;
  border: 1px solid #dfe7ef;
  border-radius: 6px;
  padding: 6px;
  background: #ffffff;
}

.import-run-table {
  min-width: 980px;
}

.dashboard-message {
  margin: 0;
  padding: 0 18px 18px;
  color: #526174;
}

#saveStatus[data-type="warn"] {
  color: #664d03;
  background: #fff3cd;
}

.cms-tab-panel #contentJson {
  min-height: 68vh;
}

[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .cms-topbar,
  .cms-toolbar,
  .cms-toolbar-controls,
  .cms-tab-panel[data-panel="editor"].active,
  .cms-form-grid,
  .cms-translation-pair,
  .dashboard-hero,
  .dashboard-users,
  .dashboard-import,
  .parser-workbench,
  .parser-controls,
  .parser-preview-head {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .cms-section-nav {
    position: static;
  }

  .cms-actions {
    justify-content: flex-start;
  }

  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .landing-header {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 16px;
    backdrop-filter: none;
  }

  .landing-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .landing-nav a,
  .landing-nav .landing-button,
  .language-switcher {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .landing-nav a {
    font-size: 0.9rem;
  }

  .landing-button.small {
    min-height: 34px;
    padding: 0 12px;
  }

  .landing-footer nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .landing-hero,
  .feature-grid,
  .landing-footer {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: clamp(2.4rem, 13vw, 4.2rem);
  }

  .landing-hero {
    padding-top: 34px;
  }

  .cms-tabs,
  .cms-language,
  .cms-actions {
    overflow-x: auto;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* CPU catalog */

body.cpu-explorer-page {
  --cpu-filter-gap: 2px;
  --cpu-filter-padding: 3px;
  --cpu-filter-option-height: 16px;
  --cpu-filter-facet-width: 205px;
  --cpu-filter-facet-height: 144px;
  --cpu-filter-sidebar-width: 250px;
  --table-scroll-top-offset: 104px;
  --table-scroll-height: 13px;
  color: #1c2938;
  background: #eef3f7;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 46px;
  padding: 6px min(2vw, 24px);
  border-bottom: 1px solid #d7e0ea;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.app-brand span {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(15, 107, 116, 0.36);
  border-radius: 7px;
  color: #0f6b74;
  background: #e8f4f5;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #526174;
  font-size: 0.92rem;
}

.app-language-switch {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid #cfe0ea;
  border-radius: 7px;
  background: #edf6f8;
}

.landing-header .language-switcher {
  gap: 3px;
  padding: 3px;
  border: 1px solid #cfe0ea;
  border-radius: 7px;
  background: #edf6f8;
}

.app-language-switch button {
  min-height: 28px;
  border-radius: 5px;
  padding: 0 9px;
  color: #526174;
  background: transparent;
  font-size: 0.8rem;
}

.app-language-switch button[aria-pressed="true"] {
  color: #ffffff;
  background: #0f6b74;
}

.landing-header .language-switcher button {
  min-height: 28px;
  border-radius: 5px;
  padding: 0 9px;
  color: #526174;
  background: transparent;
  font-size: 0.8rem;
}

.landing-header .language-switcher button[aria-pressed="true"] {
  color: #ffffff;
  background: #0f6b74;
}

.explorer-shell {
  width: min(3200px, 100%);
  margin: 0 auto;
  padding: 8px clamp(16px, 1.6vw, 42px) 80px;
}

.explorer-title {
  display: block;
  margin-bottom: 6px;
}

.explorer-title h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  line-height: 1.05;
}

.explorer-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.explorer-stats div,
.data-panel,
.advanced-filters,
.explorer-toolbar {
  border: 1px solid #d7e0ea;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(31, 44, 58, 0.04);
}

.explorer-stats div {
  min-height: 68px;
  padding: 12px;
}

.explorer-stats span {
  display: block;
  color: #657386;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.explorer-stats strong {
  display: block;
  margin-top: 6px;
  font-size: 1.25rem;
}

.explorer-toolbar {
  position: sticky;
  top: 46px;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto auto auto;
  gap: 7px;
  align-items: end;
  padding: 7px;
  margin-bottom: 6px;
}

.explorer-toolbar > button {
  align-self: end;
  justify-self: start;
  min-height: 36px;
  padding-inline: 12px;
  width: auto;
  white-space: nowrap;
}

.explorer-toolbar #clearFilters {
  justify-self: start;
  min-width: 96px;
  min-height: 36px;
  padding-inline: 10px;
  white-space: nowrap;
}

.catalog-admin-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 220px) auto auto;
  gap: 8px;
  align-items: end;
  margin: 0 24px 8px;
  border: 1px solid #cbd7e3;
  border-radius: 6px;
  padding: 8px;
  background: #fbfdff;
}

.catalog-admin-tools[hidden] {
  display: none;
}

.catalog-admin-tools > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.catalog-admin-tools strong {
  color: #0f6b74;
  font-size: 0.82rem;
}

.catalog-admin-tools span {
  overflow: hidden;
  color: #526174;
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-admin-tools label {
  display: grid;
  gap: 2px;
  color: #415064;
  font-size: 0.72rem;
  font-weight: 900;
}

.catalog-admin-tools select {
  min-height: 30px;
  font-size: 0.78rem;
}

.catalog-admin-tools button {
  min-height: 30px;
  white-space: nowrap;
}

.explorer-toolbar label,
.advanced-filters label {
  display: grid;
  gap: 3px;
  color: #415064;
  font-size: 0.78rem;
  font-weight: 900;
}

.explorer-toolbar input,
.explorer-toolbar select,
.advanced-filters input,
.advanced-filters select {
  min-height: 38px;
  font-size: 0.86rem;
}

.column-picker,
.filter-picker {
  position: absolute;
  top: calc(100% + 8px);
  z-index: 45;
  width: min(1120px, calc(100vw - 26px));
  max-height: 78vh;
  overflow: auto;
  border: 1px solid #cbd7e3;
  border-radius: 8px;
  padding: 8px;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(31, 44, 58, 0.18);
}

.column-picker {
  right: 230px;
}

.filter-picker {
  right: 110px;
}

.column-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.column-picker-head > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.column-picker fieldset {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 4px 8px;
  margin: 0 0 7px;
  border: 1px solid #e0e7ef;
  border-radius: 8px;
  padding: 7px;
}

.column-picker legend {
  padding: 0 6px;
  color: #0f6b74;
  font-weight: 900;
}

.column-picker label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #2d3e52;
  font-size: 0.78rem;
  font-weight: 700;
}

.column-manager-section {
  display: grid;
  gap: 5px;
  margin-bottom: 7px;
  border: 1px solid #e0e7ef;
  border-radius: 6px;
  padding: 6px;
  background: #fbfdff;
}

.column-manager-section h3 {
  margin: 0;
  color: #0f6b74;
  font-size: 0.78rem;
}

.column-manager-section > p {
  margin: 0;
  color: #657386;
  font-size: 0.7rem;
}

.layout-sort-list {
  display: grid;
  gap: 3px;
}

.layout-order-section .layout-sort-list {
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}

.layout-sort-row {
  display: grid;
  grid-template-columns: 24px minmax(110px, 1fr) minmax(90px, 0.8fr) 56px 26px 26px;
  gap: 5px;
  align-items: center;
  min-width: 0;
  border: 1px solid #dce7ee;
  border-radius: 4px;
  padding: 3px;
  background: #ffffff;
}

.layout-sort-row.is-dragging {
  opacity: 0.45;
}

.layout-sort-row strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layout-sort-row input[type="range"] {
  width: 100%;
  min-width: 70px;
}

.layout-sort-row output {
  color: #526174;
  font-size: 0.68rem;
  text-align: right;
  white-space: nowrap;
}

.layout-drag-handle,
.layout-move-button {
  min-width: 0;
  min-height: 24px;
  padding: 0;
  color: #0f6b74;
  background: #e8f4f5;
  font-size: 0.72rem;
  cursor: grab;
}

.layout-drag-handle:active {
  cursor: grabbing;
}

.layout-move-button {
  cursor: pointer;
}

.column-preset-list,
.column-custom-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.column-custom-filter-item {
  display: flex;
  align-items: stretch;
  gap: 4px;
}

.column-view-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.column-view-editor input {
  flex: 1 1 180px;
  min-height: 28px;
  padding: 3px 7px;
  font-size: 0.76rem;
}

.column-preset-list button,
.column-custom-filter-list button {
  min-height: 26px;
  border: 1px solid #d3e0e8;
  border-radius: 4px;
  padding: 3px 7px;
  color: #21354b;
  background: #ffffff;
  font-size: 0.76rem;
}

.filter-box-list {
  display: grid;
  gap: 4px;
}

.filter-box-row {
  grid-template-columns: 24px minmax(160px, 1fr) auto auto;
  gap: 5px;
  min-height: 28px;
  border: 1px solid #dce7ee;
  border-radius: 4px;
  padding: 3px 6px;
  background: #ffffff;
}

.filter-box-row > div {
  display: grid;
  min-width: 0;
}

.filter-box-row strong,
.filter-box-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-box-row span {
  color: #657386;
  font-size: 0.68rem;
}

.filter-box-row > .filter-sort-controls {
  display: flex;
  align-items: center;
  gap: 3px;
}

.filter-sort-controls button {
  min-height: 24px;
  border: 1px solid #d3e0e8;
  border-radius: 4px;
  padding: 2px 7px;
  color: #0f6b74;
  background: #f1f7f8;
  font-size: 0.68rem;
  font-weight: 850;
  white-space: nowrap;
}

.filter-sort-controls button[aria-pressed="true"] {
  border-color: #0f6b74;
  color: #ffffff;
  background: #0f6b74;
}

.filter-source-results,
.filter-source-groups {
  display: grid;
  gap: 4px 10px;
  max-height: 310px;
  overflow: auto;
}

.filter-source-groups {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  border-top: 1px solid #edf2f6;
  padding-top: 4px;
}

.source-picker-note {
  margin: 0;
  color: #657386;
  font-size: 0.72rem;
  line-height: 1.25;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  min-height: 15px;
  border: 1px solid #d5e7ec;
  border-radius: 3px;
  padding: 0 4px;
  color: #0f6b74;
  background: #edf8fa;
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  vertical-align: 1px;
}

.attribute-source-group {
  min-width: 0;
  padding: 2px 0 4px;
  border-bottom: 1px solid #edf2f6;
}

.attribute-source-group h3 {
  margin: 0 0 2px;
  color: #0f6b74;
  font-size: 0.66rem;
  line-height: 1.15;
  text-transform: uppercase;
}

.attribute-source-group h3 .source-pill,
.category-source-group h3 .source-pill {
  margin-right: 4px;
}

.attribute-source-group > div {
  display: grid;
  gap: 1px;
}

.filter-source-results button,
.attribute-source-group button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 5px;
  min-height: 0;
  border: 1px solid #d3e0e8;
  border-radius: 3px;
  padding: 2px 5px;
  color: #21354b;
  background: #ffffff;
  text-align: left;
  font-size: 0.72rem;
}

.attribute-source-group button:hover,
.attribute-source-group button:focus-visible {
  background: #edf8fa;
}

.filter-source-results button span,
.filter-source-results button em,
.attribute-source-group button small {
  overflow: hidden;
  color: #657386;
  font-size: 0.62rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-source-results button strong,
.attribute-source-group button strong {
  overflow: hidden;
  font-size: 0.72rem;
  line-height: 1.18;
  text-overflow: clip;
  white-space: normal;
}

.empty-filter-note {
  margin: 4px;
  color: #657386;
  font-size: 0.78rem;
}

.column-preset-list button[aria-pressed="true"] {
  color: #ffffff;
  background: #0f6b74;
}

.column-source-search {
  display: grid;
  gap: 2px;
}

.column-manager-section > input.column-source-search {
  width: 100%;
  min-height: 27px;
  padding: 3px 7px;
  font-size: 0.76rem;
}

.column-source-search input {
  min-height: 28px;
}

.column-custom-filter-list button {
  display: grid;
  min-width: 180px;
  max-width: 260px;
  text-align: left;
}

.column-custom-filter-item > button:first-child {
  min-width: 150px;
}

.column-custom-filter-item > button:last-child {
  min-width: 0;
  max-width: none;
}

.column-custom-filter-list button span {
  overflow: hidden;
  color: #657386;
  font-size: 0.66rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-custom-filter-list button strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-picker input[type="checkbox"],
.inline-check input {
  width: 16px;
  min-height: 16px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 24px;
  margin-bottom: 5px;
}

.filter-chips span,
.filter-chips button {
  border: 1px solid #d7e0ea;
  border-radius: 999px;
  padding: 3px 8px;
  color: #526174;
  background: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
}

.filter-chips button {
  min-height: 0;
  cursor: pointer;
}

.explorer-workspace {
  display: block;
}

.advanced-filters {
  margin-bottom: 6px;
  overflow: visible;
}

.advanced-filters summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
  min-height: 26px;
  padding: 4px 7px;
  color: #17202a;
  font-weight: 900;
}

.advanced-filters summary small {
  color: #657386;
  font-size: 0.78rem;
  font-weight: 800;
}

.filter-view-switch,
.detail-view-switch {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cpu-filter-gap);
  padding: 0 8px 5px;
}

.detail-view-switch {
  padding: 0;
}

.filter-view-switch button,
.detail-view-switch button {
  min-height: 24px;
  border: 1px solid #9aa5ad;
  border-radius: 14px;
  padding: 0 9px;
  color: #0f6b74;
  background: #ffffff;
  font-size: 0.75rem;
  line-height: 1;
  white-space: nowrap;
}

.filter-view-switch button::before {
  margin-right: 4px;
  color: inherit;
}

.filter-view-switch button[data-filter-style="vertical"]::before {
  content: "▤";
}

.filter-view-switch button[data-filter-style="horizontalLess"]::before {
  content: "▭";
}

.filter-view-switch button[data-filter-style="horizontalMore"]::before {
  content: "▦";
}

.filter-view-switch button[aria-pressed="true"],
.detail-view-switch button[aria-pressed="true"] {
  color: #ffffff;
  background: #0f6b74;
}

.filter-controls {
  padding: 0 6px 6px;
}

.filter-toolbar {
  display: grid;
  grid-template-columns: minmax(160px, 240px);
  gap: var(--cpu-filter-gap);
  padding: 0;
}

.filter-tuning {
  margin-bottom: var(--cpu-filter-gap);
  border: 1px solid #dbe6ef;
  border-radius: 3px;
  padding: var(--cpu-filter-padding);
  background: #fbfdff;
}

.filter-tuning summary {
  min-height: 0;
  padding: 0;
  font-size: 0.74rem;
}

.filter-tuning > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 220px));
  gap: var(--cpu-filter-gap);
  margin-top: var(--cpu-filter-gap);
}

.filter-tuning label {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: #415064;
  font-size: 0.72rem;
  font-weight: 900;
}

.filter-tuning label span {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.filter-tuning input[type="range"] {
  min-height: 18px;
}

.filter-grid,
.tme-filter-grid,
.attribute-filter-grid {
  display: flex;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: var(--cpu-filter-gap);
  overflow-x: auto;
  padding-bottom: 4px;
}

.facet-box {
  position: relative;
  flex: 0 0 var(--facet-width, var(--cpu-filter-facet-width));
  width: var(--facet-width, var(--cpu-filter-facet-width));
  min-width: 0;
  border: 1px solid #b9c5cc;
  border-radius: 0;
  padding: var(--cpu-filter-padding);
  background: #ffffff;
}

.facet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--cpu-filter-gap);
  margin-bottom: 2px;
}

.facet-head h3,
.facet-box h3 {
  margin: 0;
  overflow: hidden;
  font-size: 0.73rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.facet-head strong {
  color: #657386;
  font-size: 0.72rem;
}

.facet-box > input {
  width: 100%;
  min-height: 23px;
  margin-bottom: 2px;
  padding: 2px 20px 2px 6px;
  font-size: 0.72rem;
}

.facet-mini-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  margin-bottom: 2px;
  overflow: hidden;
}

.facet-mini-actions button {
  min-height: 16px;
  padding: 0;
  color: #0f6b74;
  background: transparent;
  font-size: 0.62rem;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.facet-mini-actions button[aria-pressed="true"] {
  border-radius: 3px;
  padding: 0 4px;
  color: #ffffff;
  background: #0f6b74;
}

.facet-action-separator {
  width: 1px;
  height: 12px;
  background: #c9d7df;
}

.facet-mini-actions .facet-select-toggle {
  font-size: 0.58rem;
}

.facet-mini-actions .facet-select-toggle:disabled {
  cursor: default;
  opacity: 0.45;
}

.facet-options {
  display: grid;
  align-content: start;
  grid-auto-rows: min-content;
  gap: 1px;
  height: var(--facet-height, var(--cpu-filter-facet-height));
  max-height: none;
  overflow: auto;
  padding-right: 2px;
}

.facet-option {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 3px;
  align-items: center;
  min-height: var(--cpu-filter-option-height);
  height: var(--cpu-filter-option-height);
  color: #17202a;
  font-size: 0.72rem;
  font-weight: 750;
}

.facet-option span {
  min-width: 0;
  overflow: hidden;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.facet-option input {
  width: 13px;
  min-height: 13px;
  margin: 0;
}

.facet-option em {
  color: #657386;
  font-style: normal;
}

.facet-box.compact {
  min-width: 0;
}

.facet-box.compact > .facet-options {
  display: grid;
  align-content: start;
  grid-auto-rows: min-content;
  gap: 1px;
  height: var(--facet-height, var(--cpu-filter-facet-height));
  max-height: none;
  overflow: auto;
}

.facet-resize-edge {
  position: absolute;
  z-index: 3;
  touch-action: none;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.facet-resize-edge-x {
  top: 0;
  right: 0;
  bottom: 0;
  width: 12px;
  cursor: ew-resize;
}

.facet-resize-edge-x::after {
  position: absolute;
  top: calc(50% - 14px);
  right: 1px;
  width: 2px;
  height: 28px;
  border-radius: 2px;
  background: #7b8996;
  content: "";
}

.facet-resize-edge-y {
  right: 0;
  bottom: -2px;
  left: 0;
  height: 10px;
  cursor: ns-resize;
}

.facet-resize-edge-y::after {
  position: absolute;
  bottom: 2px;
  left: 42%;
  width: 16%;
  min-width: 24px;
  height: 2px;
  border-radius: 2px;
  background: #7b8996;
  content: "";
}

.facet-box:hover > .facet-resize-edge,
.facet-box.is-active-resize > .facet-resize-edge {
  opacity: 1;
}

.facet-box.is-active-resize {
  border-color: #7b8996;
  box-shadow: 0 0 0 1px rgba(123, 137, 150, 0.18);
}

.facet-box.is-active-resize > .facet-resize-edge::after {
  background: #405365;
}

.is-resizing-filter {
  user-select: none;
}

.is-resizing-filter-x {
  cursor: ew-resize;
}

.is-resizing-filter-y {
  cursor: ns-resize;
}

body.cpu-explorer-page[data-filter-layout-mode="horizontalLess"] .tme-filter-grid {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
}

body.cpu-explorer-page[data-filter-layout-mode="horizontalMore"] .tme-filter-grid {
  flex-wrap: wrap;
  max-height: 430px;
  overflow: auto;
  align-content: flex-start;
}

body.cpu-explorer-page[data-filter-layout-mode="vertical"] .advanced-filters {
  float: left;
  position: sticky;
  top: 72px;
  z-index: 25;
  width: var(--cpu-filter-sidebar-width);
  max-height: calc(100vh - 86px);
  margin-right: 10px;
  overflow: auto;
}

body.cpu-explorer-page[data-filter-layout-mode="vertical"] .advanced-filters summary {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #ffffff;
}

body.cpu-explorer-page[data-filter-layout-mode="vertical"] .filter-view-switch {
  align-items: flex-start;
  flex-direction: column;
}

body.cpu-explorer-page[data-filter-layout-mode="vertical"] .filter-tuning > div,
body.cpu-explorer-page[data-filter-layout-mode="vertical"] .tme-filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  overflow: visible;
}

body.cpu-explorer-page[data-filter-layout-mode="vertical"] .facet-box {
  width: 100%;
}

body.cpu-explorer-page[data-filter-layout-mode="vertical"] .facet-box {
  flex-basis: auto;
}

body.cpu-explorer-page[data-filter-layout-mode="vertical"] .explorer-workspace {
  min-width: 0;
  overflow: hidden;
}

body.cpu-explorer-page[data-filter-layout-mode="vertical"] .filter-chips {
  overflow: hidden;
}

@media (min-width: 2200px) {
  .explorer-toolbar {
    grid-template-columns: minmax(720px, 1fr) minmax(170px, 220px) auto auto;
  }

  .column-picker,
  .filter-picker {
    width: min(1160px, calc(100vw - 80px));
  }

  .category-source-picker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-height: 360px;
  }

  .drawer-panel {
    width: min(1180px, 100vw);
  }

  .detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
  }

  .parser-workbench {
    grid-template-columns: minmax(0, 1.6fr) minmax(460px, 0.8fr);
  }

  .cms-tab-panel[data-panel="editor"] {
    grid-template-columns: 240px minmax(900px, 1fr);
  }
}

.category-builder {
  padding: 0 8px 8px;
}

.custom-column-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.46);
}

.custom-column-dialog {
  width: min(1720px, 100%);
  max-height: min(820px, calc(100vh - 32px));
  overflow: auto;
  border: 1px solid #c8d8e4;
  border-radius: 6px;
  padding: 10px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.category-builder-head h2 {
  margin: 0;
  font-size: 0.98rem;
}

.category-builder-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.category-builder-head p {
  margin: 2px 0 6px;
  color: #657386;
}

.category-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 6px;
}

.category-flow span {
  border: 1px solid #d5e7ec;
  border-radius: 999px;
  padding: 2px 7px;
  color: #0f6b74;
  background: #edf8fa;
  font-size: 0.68rem;
  font-weight: 900;
}

.category-explainer {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  border: 1px solid #c8d8e4;
  border-radius: 8px;
  padding: 12px;
  color: #31465d;
  background: #f7fbfd;
}

.category-explainer strong {
  color: #102033;
}

.category-explainer p {
  margin: 0;
  line-height: 1.5;
}

.category-form {
  display: grid;
  grid-template-columns: minmax(145px, 0.55fr) minmax(250px, 0.95fr) minmax(340px, 1.55fr) auto;
  gap: 6px;
  align-items: end;
}

.category-form input,
.category-form textarea {
  min-height: 28px;
  padding: 3px 7px;
  font-size: 0.82rem;
}

.category-expression-field textarea {
  min-height: 50px;
  resize: vertical;
  font-family: Consolas, "Liberation Mono", monospace;
  line-height: 1.25;
}

.category-source-field strong {
  color: #526174;
  font-size: 0.74rem;
  line-height: 1.2;
}

.category-source-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 3px 8px;
  max-height: 260px;
  overflow: auto;
  margin-top: 6px;
  border-block: 1px solid #dfe7ef;
  padding-block: 4px;
}

.category-source-picker p {
  margin: 0;
  color: #657386;
}

.category-source-group {
  min-width: 0;
  padding: 2px 0 4px;
  border-bottom: 1px solid #edf2f6;
}

.category-source-group h3 {
  margin: 0 0 2px;
  color: #0f6b74;
  font-size: 0.66rem;
  text-transform: uppercase;
  line-height: 1.15;
}

.category-source-group > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 1px 5px;
}

.category-source-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 5px;
  align-content: start;
  min-height: 0;
  padding: 2px 3px;
  color: #17202a;
  background: transparent;
  border: 0;
  border-radius: 3px;
  text-align: left;
}

.category-source-option:hover,
.category-source-option:focus-visible {
  background: #edf8fa;
}

.category-source-option small {
  color: #657386;
  font-size: 0.62rem;
  white-space: nowrap;
}

.category-source-option strong {
  font-size: 0.72rem;
  line-height: 1.18;
  white-space: normal;
}

.category-syntax {
  margin-top: 6px;
  border: 1px solid #dfe7ef;
  border-radius: 4px;
  padding: 6px;
  background: #fbfcfe;
}

.category-syntax h3 {
  margin: 0 0 4px;
  font-size: 0.82rem;
}

.category-syntax ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 2px 10px;
  margin: 0;
  padding-left: 18px;
  color: #526174;
  font-size: 0.74rem;
}

.category-syntax code {
  color: #0f6b74;
  font-weight: 800;
}

.category-form label {
  min-width: 0;
}

.custom-categories {
  display: grid;
  gap: 5px;
  margin-top: 6px;
}

.category-value-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.custom-column-preview {
  max-height: 170px;
  overflow: auto;
  color: #526174;
}

.custom-column-preview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.custom-column-preview th,
.custom-column-preview td {
  padding: 4px 6px;
  border-bottom: 1px solid #dfe7ef;
  text-align: left;
  vertical-align: top;
}

.custom-column-preview th {
  color: #25374d;
  background: #eef5f9;
}

.category-value-suggestions p {
  margin: 0;
  color: #657386;
}

.category-value-suggestions button {
  min-height: 30px;
  max-width: 280px;
  overflow: hidden;
  padding: 0 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-value-suggestions button span {
  margin-left: 6px;
  color: #657386;
  font-weight: 800;
}

.custom-categories > p {
  margin: 0;
  color: #657386;
}

.custom-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dfe7ef;
  border-radius: 6px;
  padding: 10px;
  background: #fbfcfe;
}

.custom-category span {
  display: block;
  overflow: hidden;
  max-width: 80ch;
  color: #657386;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-category-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.data-panel {
  overflow: hidden;
  min-width: 0;
}

.data-panel-head {
  display: grid;
  grid-template-columns: minmax(190px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 4px 7px;
  border-bottom: 1px solid #edf1f5;
}

.data-panel-head > div:first-child {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.processor-preset-controls {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}

.processor-preset-list,
.processor-preset-editor {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.processor-preset-list {
  flex: 1 1 420px;
  justify-content: flex-start;
  overflow: visible;
}

.processor-preset-editor {
  flex: 1 1 360px;
  justify-content: flex-start;
}

.processor-preset-list button,
.processor-preset-editor button {
  min-height: 26px;
  border: 1px solid #d3e0e8;
  border-radius: 5px;
  padding: 3px 7px;
  color: #0f6b74;
  background: #eef9fb;
  font-size: 0.74rem;
  font-weight: 900;
  white-space: nowrap;
}

.processor-preset-list button {
  flex: 0 0 auto;
  max-width: none;
}

.processor-preset-list button[aria-pressed="true"] {
  color: #ffffff;
  border-color: #0f6b74;
  background: #0f6b74;
}

.processor-preset-editor input {
  width: 130px;
  min-height: 26px;
  border: 1px solid #c9d3df;
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 0.74rem;
  font-weight: 800;
}

.page-size-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #526174;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.page-size-control select {
  width: 86px;
  min-height: 26px;
  border: 1px solid #c9d3df;
  border-radius: 5px;
  padding: 2px 22px 2px 6px;
  font-size: 0.74rem;
  font-weight: 800;
}

.processor-preset-editor button:disabled {
  cursor: default;
  opacity: 0.45;
}

.data-panel-head h2 {
  margin: 0 0 2px;
}

.data-panel-head p {
  margin: 0;
  color: #657386;
}

.pagination-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.data-panel-head .pagination-controls {
  grid-column: 2;
  grid-row: 1;
}

.pagination-controls button {
  min-height: 28px;
  padding: 3px 8px;
}

.pagination-controls button:disabled {
  cursor: default;
  opacity: 0.45;
}

.table-state {
  margin: 12px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  padding: 12px;
  color: #526174;
  background: #fbfcfe;
  font-weight: 800;
}

.table-state[data-type="error"] {
  color: #842029;
  background: #f8d7da;
}

.data-table-wrap {
  max-width: 100%;
  max-height: max(360px, calc(100vh - 292px));
  overflow: auto;
  scrollbar-width: thin;
}

.table-scroll-top {
  display: none !important;
}

.table-scroll-top > div {
  height: 1px;
}

.data-table-wrap.allow-scroll {
  overflow-x: auto;
}

.cpu-data-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table-wrap.allow-scroll .cpu-data-table {
  min-width: max(100%, 1320px);
}

.data-table-wrap.raw-width .cpu-data-table {
  min-width: max(100%, 1540px);
}

.cpu-data-table th,
.cpu-data-table td {
  padding: 5px 7px;
  border-bottom: 1px solid #edf1f5;
  vertical-align: middle;
}

.data-table-wrap.compact .cpu-data-table th,
.data-table-wrap.compact .cpu-data-table td {
  padding: 3px 6px;
  font-size: 0.76rem;
  line-height: 1.1;
}

.cpu-data-table thead th {
  position: sticky;
  top: 0;
  z-index: 11;
  color: #415064;
  background: #f9fbfd;
  box-shadow: inset 0 -1px #dfe7ef;
}

.cpu-data-table th button {
  min-height: 0;
  padding: 0;
  color: #415064;
  background: transparent;
  font-size: 0.78rem;
  line-height: 1.25;
  text-align: left;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cpu-data-table td {
  min-width: 0;
  overflow: hidden;
  color: #17202a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cpu-data-table .col-name {
  min-width: 560px;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}

.cpu-data-table th.col-name {
  width: 560px;
}

.cpu-data-table .col-name .cpu-name-button {
  width: max-content;
  max-width: none;
}

.cpu-data-table td span {
  display: block;
  overflow: hidden;
  color: #657386;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-col {
  width: 54px;
}

.actions-col {
  width: 170px;
}

.row-actions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.row-actions button {
  min-height: 24px;
  padding: 0 8px;
  font-size: 0.74rem;
}

.cpu-name-button {
  display: block;
  min-height: 0;
  overflow: visible;
  padding: 0;
  color: #17202a;
  background: transparent;
  font-weight: 900;
  text-align: left;
  text-overflow: clip;
  white-space: nowrap;
}

.cpu-plain-value {
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cpu-muted {
  color: #728196;
}

.detail-drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  justify-content: end;
  background: rgba(17, 31, 45, 0.38);
}

.detail-drawer[aria-hidden="true"] {
  display: none;
}

.drawer-panel {
  width: min(860px, 100vw);
  height: 100vh;
  overflow: auto;
  border-left: 1px solid #cbd7e3;
  background: #ffffff;
  box-shadow: -24px 0 70px rgba(31, 44, 58, 0.22);
}

.drawer-head,
.drawer-actions {
  position: sticky;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #edf1f5;
}

.drawer-head {
  top: 0;
  align-items: start;
  background: #ffffff;
}

.drawer-head h2 {
  margin: 0 0 2px;
  font-size: 1.05rem;
  line-height: 1.2;
}

.drawer-head p:not(.eyebrow) {
  margin: 0;
  color: #657386;
  font-size: 0.82rem;
}

.drawer-actions,
.inline-check {
  align-items: center;
}

.drawer-actions {
  top: var(--drawer-head-height, 75px);
  background: #ffffff;
}

.inline-check {
  display: flex;
  gap: 5px;
  color: #526174;
  font-size: 0.78rem;
  font-weight: 800;
}

.drawer-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 6px 10px;
  border-bottom: 1px solid #edf1f5;
  background: #ffffff;
}

.drawer-tabs button {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 0 9px;
  color: #385066;
  font-size: 0.76rem;
  background: #edf4f7;
}

.drawer-tabs button.active {
  color: #ffffff;
  background: #0f6b74;
}

.drawer-content {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.detail-audit-strip {
  position: sticky;
  top: calc(var(--drawer-head-height, 75px) + 48px);
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 4px;
  border: 1px solid #d7e0ea;
  border-radius: 5px;
  padding: 5px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(31, 44, 58, 0.08);
}

.detail-audit-strip div {
  min-width: 0;
  border: 1px solid #edf1f5;
  border-radius: 3px;
  padding: 4px 5px;
  background: #fbfcfe;
}

.detail-audit-strip span {
  display: block;
  color: #728196;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-audit-strip strong {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-audit-strip a {
  align-self: stretch;
  min-height: 0;
  padding: 0 8px;
}

.detail-section {
  border: 1px solid #dfe7ef;
  border-radius: 4px;
  padding: 8px;
  background: #fbfcfe;
}

.detail-section h3 {
  margin: 0 0 6px;
  font-size: 0.9rem;
  line-height: 1.2;
}

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

.detail-grid div {
  min-width: 0;
  border: 1px solid #edf1f5;
  border-radius: 3px;
  padding: 5px 6px;
  background: #ffffff;
}

.detail-grid div.is-suspicious,
.detail-spec-table tr.is-suspicious {
  background: #fff7ed;
}

.missing-attribute-value {
  color: #8a98a8;
  font-style: italic;
}

.detail-grid small {
  display: block;
  margin-top: 3px;
  color: #a15c12;
  font-size: 0.68rem;
  font-weight: 800;
}

.detail-grid small.attribute-source-note,
.attribute-source-note {
  display: block;
  margin-top: 2px;
  color: #657386;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.25;
}

.detail-grid span {
  display: block;
  color: #728196;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-grid strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 2px;
  font-size: 0.86rem;
  line-height: 1.25;
}

.detail-source-actions {
  margin: 7px 0 0;
}

.detail-source-actions a {
  min-height: 28px;
}

.detail-table-section {
  overflow: auto;
}

.detail-spec-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.detail-spec-table th,
.detail-spec-table td {
  border-bottom: 1px solid #edf1f5;
  padding: 5px 7px;
  font-size: 0.8rem;
  text-align: left;
  vertical-align: top;
}

.detail-spec-table thead th {
  color: #415064;
  background: #f5f9fc;
}

.detail-spec-table th:first-child {
  width: 28%;
  color: #26384c;
}

.detail-spec-table td:nth-child(3) {
  width: 13%;
}

.detail-spec-table td:last-child {
  width: 22%;
  color: #a15c12;
  font-weight: 800;
}

.detail-attribute-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
}

.detail-attribute-table th,
.detail-attribute-table td {
  padding: 5px 7px;
  border-bottom: 1px solid #edf1f5;
  font-size: 0.8rem;
  text-align: left;
  vertical-align: top;
}

.detail-attribute-table th {
  color: #415064;
  background: #f5f9fc;
}

@media (max-width: 1180px) {
  body.cpu-explorer-page {
    --table-scroll-top-offset: 46px;
  }

  .explorer-title,
  .explorer-toolbar {
    grid-template-columns: 1fr;
  }

  .explorer-toolbar {
    grid-template-columns: auto auto auto minmax(0, 1fr);
    justify-content: stretch;
  }

  .explorer-toolbar .toolbar-search {
    grid-column: 1 / -1;
  }

  .explorer-toolbar #clearFilters {
    min-width: 104px;
  }

  .explorer-toolbar,
  .advanced-filters {
    position: static;
  }

  .cpu-data-table thead th {
    top: 0;
  }

  .advanced-filters {
    order: -1;
  }

  .filter-toolbar {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .filter-grid,
  .tme-filter-grid,
  .attribute-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-tuning > div {
    grid-template-columns: 1fr;
  }

  .processor-preset-controls {
    justify-content: flex-start;
  }

  .processor-preset-list {
    justify-content: flex-start;
    overflow: visible;
    padding-bottom: 0;
  }

  .category-form {
    grid-template-columns: 1fr 1fr;
  }

  .category-source-picker,
  .category-syntax ul {
    grid-template-columns: 1fr;
  }

  body.cpu-explorer-page[data-filter-layout-mode="vertical"] .advanced-filters {
    float: none;
    position: static;
    width: auto;
    max-height: none;
    margin-right: 0;
  }
}

@media (max-width: 760px) {
  body.cpu-explorer-page {
    --table-scroll-top-offset: 96px;
  }

  .catalog-admin-tools {
    grid-template-columns: 1fr;
    margin-inline: 10px;
  }

  .catalog-admin-tools span {
    white-space: normal;
  }

  .import-health-tags {
    grid-template-columns: 1fr;
  }

  .app-header,
  .drawer-head,
  .drawer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .app-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .data-panel-head {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 5px 7px;
  }

  .data-panel-head > div:first-child,
  .data-panel-head .pagination-controls,
  .processor-preset-controls {
    grid-column: 1;
    grid-row: auto;
  }

  .data-panel-head .pagination-controls {
    justify-content: flex-start;
    gap: 4px;
  }

  .data-panel-head .pagination-controls .page-size-control {
    flex: 0 1 auto;
  }

  .data-panel-head .pagination-controls button {
    flex: 0 0 auto;
  }

  .data-panel-head .pagination-controls #pageInfo {
    flex: 0 0 auto;
  }

  .processor-preset-controls {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }

  .processor-preset-list {
    flex: 0 0 auto;
    width: 100%;
    justify-content: flex-start;
    overflow: visible;
    padding-bottom: 0;
  }

  .processor-preset-editor {
    align-items: center;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
  }

  .processor-preset-editor input {
    flex: 1 1 160px;
    width: auto;
    min-width: 0;
  }

  .processor-preset-editor button {
    flex: 0 0 auto;
    min-height: 26px;
    min-width: 0;
    width: auto;
    padding-inline: 8px;
  }

  .explorer-stats,
  .detail-grid,
  .column-picker fieldset,
  .filter-toolbar,
  .filter-grid,
  .tme-filter-grid,
  .attribute-filter-grid,
  .filter-tuning > div,
  .category-form {
    grid-template-columns: 1fr;
  }

  .explorer-shell {
    padding-inline: 12px;
  }

  .audit-log-panel {
    padding: 7px;
    font-size: 0.8rem;
  }

  .audit-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .audit-row small {
    justify-self: start;
    max-width: none;
    text-align: left;
  }

  .column-picker,
  .filter-picker {
    right: 10px;
    left: 10px;
    width: auto;
  }

}

/* Catalog ownership, parser review, and source audit */
.catalog-admin-tools {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.catalog-personal-controls,
.catalog-role-controls {
  gap: 5px;
  align-items: end;
}

.catalog-personal-controls {
  display: grid;
  grid-template-columns: repeat(2, auto);
}

.catalog-role-controls {
  grid-column: 1 / -1;
  padding-top: 5px;
  border-top: 1px solid #dfe7ef;
}

.catalog-role-controls[hidden] {
  display: none;
}

.catalog-role-controls summary {
  width: max-content;
  cursor: pointer;
  color: #0f6b74;
  font-size: 0.74rem;
  font-weight: 900;
}

.catalog-role-controls > div {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 5px;
  align-items: end;
  margin-top: 5px;
}

.catalog-role-controls label {
  min-width: 180px;
}

.parser-pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-bottom: 6px;
  color: #526174;
  font-size: 0.72rem;
  font-weight: 800;
}

.parser-pipeline span {
  border: 1px solid #d6e2e8;
  border-radius: 4px;
  padding: 3px 6px;
  background: #f7fafb;
}

.parser-comparison-head {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.parser-comparison-head div {
  border: 1px solid #dfe7ef;
  border-radius: 5px;
  padding: 6px;
}

.parser-comparison-head span,
.parser-comparison-head strong {
  display: block;
}

.parser-comparison-head span {
  color: #657386;
  font-size: 0.7rem;
  font-weight: 800;
}

.parser-comparison-changed td,
.source-diff-table tr.is-different td,
.source-diff-table tr.is-different th {
  background: #fff5df;
}

.review-status {
  display: inline-block;
  border-radius: 4px;
  padding: 2px 5px;
  background: #edf2f6;
  color: #415064;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.review-approved,
.review-reviewed,
.review-fixed {
  background: #e4f5ee;
  color: #176244;
}

.review-blocked {
  background: #fde8e5;
  color: #9a3029;
}

.review-skipped,
.review-ignored {
  background: #f2f0ed;
  color: #6b6258;
}

.quality-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 110px minmax(160px, 0.7fr) auto auto;
  gap: 6px;
  padding: 6px;
}

.quality-row select,
.quality-row input {
  min-width: 0;
  min-height: 30px;
}

.attribute-dictionary-section article {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 5px 2px;
}

.attribute-dictionary-name {
  min-width: 0;
}

.attribute-dictionary-samples,
.attribute-dictionary-links {
  grid-column: 1 / -1;
  margin: 3px 0 0;
}

.attribute-dictionary-samples {
  overflow: hidden;
  color: #526174;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attribute-dictionary-links {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.attribute-dictionary-links span {
  border-radius: 3px;
  padding: 2px 4px;
  background: #edf6f7;
  color: #0f6b74;
  font-size: 0.65rem;
}

.intel-section-nav {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 5px;
  border-block: 1px solid #d7e0ea;
  background: #ffffff;
}

.intel-section-nav button {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 3px 7px;
}

.intel-detail-section {
  scroll-margin-top: 42px;
}

.source-diff-head {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.source-diff-head h3,
.source-diff-head p {
  margin: 0;
}

.source-diff-head p {
  color: #657386;
  font-size: 0.72rem;
}

.source-diff-table-wrap {
  overflow: auto;
  max-height: 420px;
  margin-top: 6px;
  border: 1px solid #dfe7ef;
}

.source-diff-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  font-size: 0.74rem;
}

.source-diff-table th,
.source-diff-table td {
  padding: 4px 6px;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  vertical-align: top;
}

.source-diff-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f2f7fa;
}

.source-diff-table tbody th span {
  display: block;
  color: #657386;
  font-size: 0.64rem;
}

.source-diff-table small {
  display: block;
  color: #657386;
}

@media (max-width: 760px) {
  .catalog-admin-tools,
  .quality-row,
  .parser-comparison-head {
    grid-template-columns: 1fr;
  }

  .catalog-role-controls {
    width: 100%;
  }

  .catalog-role-controls > div {
    grid-template-columns: 1fr;
  }

  .catalog-personal-controls {
    grid-template-columns: 1fr;
  }

  .quality-row .quiet-button {
    width: auto;
  }

  .app-nav {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    gap: 4px 12px;
    justify-content: start;
    overflow-x: visible;
  }

  .processor-preset-editor {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .processor-preset-editor input {
    grid-column: 1 / -1;
    width: 100%;
  }

  .processor-preset-editor button {
    width: 100%;
  }

  .data-panel-head .pagination-controls .page-size-control {
    flex: 1 0 100%;
  }

  .dashboard-shell {
    min-width: 0;
    max-width: 100%;
    padding: 8px;
    overflow-x: hidden;
  }

  .dashboard-hero,
  .dashboard-panel,
  .dashboard-hero > *,
  .dashboard-panel > *,
  .panel-head {
    min-width: 0;
    max-width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-hero .dashboard-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }

  .dashboard-hero .dashboard-actions a,
  .panel-head > button {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .quality-rule-form {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .quality-help,
  .quality-rule-form {
    min-width: 0;
    max-width: calc(100% - 12px);
    margin: 6px;
  }

  .quality-help > *,
  .quality-rule-form > *,
  .quality-help span,
  .quality-help code {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .layout-order-section .layout-sort-list {
    grid-template-columns: 1fr;
  }

  .layout-sort-row,
  .filter-box-row {
    grid-template-columns: 24px minmax(0, 1fr) auto;
  }

  .layout-sort-row input[type="range"],
  .layout-sort-row output {
    grid-column: 2 / -1;
  }

  .filter-sort-controls {
    grid-column: 2 / -1;
  }

  .filter-box-row > .quiet-button {
    grid-column: 2 / -1;
    width: 100%;
  }
}
