@font-face {
  font-family: "Outfit";
  src: url("fonts/Outfit-VariableFont_wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "Outfit", Arial, sans-serif;
  color: var(--charcoal);

  --green: #52ae32;
  --orange: #ef7d00;
  --charcoal: #eceef1;
  --paper: #191b1f;
  --line: #3a3e44;
  --muted: #b3b7be;
  --white: #24272c;
}

* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--charcoal);
  background-color: #17191d;
  background-image: linear-gradient(145deg, #17191d 0%, #202329 55%, #181a1e 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.wrap { position: relative; z-index: 1; }
button, input { font: inherit; }
h1, h2, .brand, .step-button { font-family: Outfit, "Arial Black", Arial, sans-serif; }

.wrap { max-width: 1180px; margin: auto; padding: 0 28px 60px; }
.top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 38px;
  width: 100vw;
  min-height: 66px;
  margin-left: calc(50% - 50vw);
  padding: 6px max(28px, calc((100vw - 1180px) / 2 + 28px));
  border-bottom: 1px solid #292929;
  background: #000;
  box-shadow: 0 3px 14px #0002;
}
.brand { display: inline-flex; align-items: center; line-height: 0; }
.brand img { display: block; width: 50px; height: 50px; object-fit: contain; }
.mode-menu { display: grid; gap: 5px; min-width: 250px; color: var(--muted); font-size: 11px; font-weight: 700; }
.mode-menu select { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--charcoal); font: inherit; font-size: 13px; font-weight: 400; }
.local { color: #397e2a; font-size: 13px; }
.hero { padding: 34px 0 22px; }
.hero p { color: #43454a; }
.system-select-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.air-treatment-setup { width: 100%; max-width: none; margin: 0 0 24px; padding: 20px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.setup-heading h3 { margin: 0; color: var(--charcoal); }
.setup-heading p { margin: 5px 0 16px; font-size: 13px; }
.scenario-picker { display: grid; gap: 7px; max-width: 760px; margin: 0 0 14px; color: var(--charcoal); font-weight: 700; }
.scenario-picker select, .scenario-picker input { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--charcoal); font: inherit; font-weight: 400; }
.system-count-picker { max-width: 260px; }
.system-profiles-panel { margin: 14px 0; padding: 18px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.system-profiles-panel h3 { margin: 0 0 6px; color: var(--charcoal); }
.system-profiles-panel > p { margin: 5px 0 12px; }
.system-profiles { display: grid; gap: 10px; }
.system-profile-row { display: grid; grid-template-columns: 70px minmax(260px, 1fr); gap: 12px; align-items: center; }
.system-profile-row label { display: grid; gap: 5px; color: var(--charcoal); font-size: 13px; font-weight: 700; }
.system-profile-row select { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--charcoal); font: inherit; font-weight: 400; }
.profile-template-preview { margin-top: 14px; }
.component-library-panel { margin: 14px 0; padding: 16px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.component-library-panel h3 { margin: 0 0 5px; color: var(--charcoal); }
.component-library-panel > p { margin: 4px 0 12px; color: var(--muted); font-size: 13px; }
.component-library-profiles { display: grid; gap: 8px; }
.component-profile-list { border: 1px solid var(--line); border-radius: 3px; padding: 9px 11px; }
.component-profile-list summary { color: var(--charcoal); font-weight: 700; cursor: pointer; }
.component-library-search { display: block; width: 100%; max-width: 420px; margin: 10px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 3px; font: inherit; }
.component-library-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 12px; max-height: 300px; overflow: auto; }
.component-library-option { display: flex; gap: 8px; align-items: flex-start; padding: 6px; border-radius: 3px; background: #fafaf8; font-size: 12px; }
.component-library-option input { margin-top: 3px; accent-color: var(--green); }
.component-library-option input:disabled { opacity: .45; }
.component-library-description { display: block; min-width: 0; }
.component-library-option strong, .component-library-option small { display: block; }
.component-library-option small { margin-top: 2px; color: var(--muted); line-height: 1.3; }
.component-library-option .all-bindings-match { color: #287a34; }
.component-library-option .has-missing-bindings { color: #8b6100; }
.component-library-option .unverified-bindings { color: #7b2525; }
.component-binding-details { margin-top: 4px; }
.component-binding-details summary { color: var(--muted); font-size: 11px; font-weight: 400; }
.component-binding-details ul { display: grid; gap: 2px; margin: 4px 0 0; padding-left: 15px; list-style: none; }
.component-binding-details li { overflow-wrap: anywhere; font-size: 10px; line-height: 1.25; }
.component-binding-details .binding-match { color: #287a34; }
.component-binding-details .binding-missing { color: #8b6100; }
.component-library-option[hidden] { display: none; }
.binding-overview-panel { margin: 14px 0; padding: 16px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.binding-overview-panel h3 { margin: 0 0 5px; color: var(--charcoal); }
.binding-overview-panel > p { margin: 4px 0 12px; color: var(--muted); font-size: 13px; }
.binding-overview-profiles { display: grid; gap: 8px; }
.binding-overview-profile { border: 1px solid var(--line); border-radius: 3px; padding: 9px 11px; }
.binding-overview-profile > summary, .binding-unmatched-list > summary { color: var(--charcoal); font-weight: 700; cursor: pointer; }
.binding-overview-search { display: block; width: 100%; max-width: 420px; margin: 10px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 3px; font: inherit; }
.binding-overview-table-wrap { max-height: 480px; overflow: auto; border: 1px solid var(--line); }
.binding-overview-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 12px; }
.binding-overview-table th, .binding-overview-table td { padding: 7px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.binding-overview-table th { position: sticky; top: 0; z-index: 1; background: #e9e9e4; color: var(--charcoal); }
.binding-overview-table tr:last-child td { border-bottom: 0; }
.binding-overview-table .binding-row-available { background: #e6f3e2; }
.binding-overview-table .binding-row-selectable { background: #fff2c9; }
.binding-overview-table .binding-row-missing { background: #f9e1df; }
.binding-overview-table .binding-row-outside { background: #f0f0ed; color: var(--muted); }
.binding-row-details summary { cursor: pointer; color: var(--charcoal); }
.binding-row-details ul, .binding-unmatched-list ul { display: grid; gap: 3px; margin: 5px 0 0; padding-left: 18px; }
.binding-row-details li, .binding-unmatched-list li { overflow-wrap: anywhere; }
.binding-detail-active, .binding-status-available { color: #287a34; }
.binding-detail-library, .binding-status-selectable { color: #8b6100; }
.binding-detail-missing, .binding-status-missing { color: #9e3539; }
.binding-detail-outside, .binding-status-outside { color: var(--muted); }
.binding-unmatched-list { margin-top: 10px; padding: 9px 10px; border-top: 1px solid var(--line); }
.tgml-preview-tools label { display: flex; align-items: center; gap: 8px; color: var(--charcoal); }
.tgml-preview-tools label.hidden { display: none; }
.tgml-preview-tools select { max-width: 180px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--charcoal); font: inherit; }
.air-treatment-setup > .small { margin: 10px 0 0; }
.setup-areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 16px; margin: 0; padding: 14px; border: 1px solid var(--line); }
.setup-areas legend { padding: 0 6px; font-size: 13px; font-weight: 700; }
.setup-areas label { display: flex; align-items: baseline; gap: 7px; padding: 5px 0; color: var(--charcoal); font-size: 12px; }
.setup-areas input { accent-color: var(--green); }
.setup-areas small { color: var(--muted); font-size: 10px; }
.setup-parameters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 15px 0; }
.setup-parameters label { display: grid; gap: 6px; color: var(--charcoal); font-size: 12px; font-weight: 700; }
.setup-parameters select { width: 100%; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--charcoal); font: inherit; font-weight: 400; }
.workflow-hero { padding-top: 16px; }
.step-navigation { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.top-tabs { align-self: stretch; flex: 1; gap: 8px; min-width: 0; margin: 0; align-items: stretch; }
.top-tabs .step-button { min-width: 0; padding: 8px 14px 6px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; color: #a9a9a9; font-size: 12px; letter-spacing: 0; text-transform: none; white-space: nowrap; transition: color .15s ease, border-color .15s ease; }
.top-tabs .step-button.active { border-bottom-color: var(--orange); background: transparent; color: #fff; }
.top-tabs .step-button:disabled { opacity: .42; color: #aaa; cursor: not-allowed; }
.top-tabs .step-button:not(:disabled):hover { color: var(--orange); }
.top-tabs .step-button:focus-visible { outline: 2px solid var(--orange); outline-offset: -3px; }
.step-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 11px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.step-button.active { border-color: var(--orange); background: var(--orange); color: #fff; }
.step-button:disabled { opacity: .72; cursor: default; }
h1 { color: var(--charcoal); font-size: 30px; margin: 8px 0; }
h2 { color: var(--charcoal); }
p { color: var(--muted); line-height: 1.55; }
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 22px;
  box-shadow: 0 5px 18px #25291c0d;
}
.step2-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.step2-heading h2 { margin: 0; }
.step2-heading p { margin-bottom: 0; }
.tgml-preview-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0; color: var(--muted); font-size: 14px; }
.tgml-preview { display: block; width: 100%; max-height: 76vh; overflow: auto; border: 1px solid var(--line); background: #f8f9fb; }
.tgml-preview svg { display: block; width: 100%; height: auto; max-height: 76vh; touch-action: none; }
.tgml-movable { cursor: grab; }
.tgml-movable.is-dragging { cursor: grabbing; }
.tgml-code { margin-top: 14px; color: var(--charcoal); }
.tgml-code summary { cursor: pointer; font-weight: 700; }
.tgml-source { display: block; width: 100%; height: min(72vh, 820px); min-height: 500px; margin-top: 10px; border: 1px solid var(--line); background: #fff; }
.drop {
  border: 1.5px dashed #a8b49f;
  border-radius: 3px;
  text-align: center;
  padding: 28px;
  background: #fbfcfa;
}
.drop.drag { background: #f0f7eb; border-color: var(--green); }
.drop h2 { margin: 0 0 6px; font-size: 17px; }
.drop p { margin: 0 0 15px; }
.button {
  border: 1px solid #c8cbc3;
  border-radius: 3px;
  padding: 10px 15px;
  background: var(--white);
  color: var(--charcoal);
  font-weight: 600;
  cursor: pointer;
}
.button:hover { border-color: var(--green); }
.button.primary { background: var(--green); color: var(--white); border-color: var(--green); }
.button.primary:hover { background: #438f29; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.filename { font-size: 13px; color: #397e2a; margin-top: 12px; }
.notice { font-size: 12px; margin-top: 14px; }
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: 3px; padding: 14px; }
.stat span { display: block; color: var(--muted); font-size: 12px; }
.stat b { font-size: 24px; }
.green { color: #397e2a; }
.yellow { color: #a66b00; }
.red { color: #b13e42; }
.included-count { color: #356b8e; }
.tablebox { overflow: auto; max-height: 520px; border: 1px solid var(--line); border-radius: 3px; }
.table { width: 100%; border-collapse: collapse; font-size: 12px; color: var(--charcoal); }
.table th { position: sticky; top: 0; background: #e8e9e3; text-align: left; }
.table th, .table td { padding: 9px 11px; border-bottom: 1px solid #e7e8e2; vertical-align: top; }
.table td:nth-child(2), .table td:nth-child(3) { min-width: 220px; }
.table tr.good { background: #e5f2df; }
.table tr.typo { background: #fff0c2; }
.table tr.bad { background: #f8dede; }
.table tr.included { background: #dce9f2; }
.status { white-space: nowrap; font-weight: 700; }
.actions { display: flex; justify-content: space-between; align-items: center; margin: 16px 0; }
.action-buttons { display: flex; gap: 10px; margin-left: auto; }
.tag-group-questions { margin: 0 0 16px; padding: 13px; border: 1px solid var(--line); border-radius: 3px; background: #fbfcfa; }
#step2Status { margin: 8px 0; }
.tag-group-questions h3 { margin: 0; color: var(--charcoal); font-size: 14px; }
.tag-group-questions > p { margin: 5px 0 10px; font-size: 12px; }
.rule-questions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin-bottom: 12px; }
.rule-question { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, 190px); align-items: center; gap: 5px 10px; color: var(--charcoal); font-size: 12px; }
.rule-question select, .rule-question input { width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--charcoal); }
.rule-question small { grid-column: 2; color: var(--muted); font-size: 10px; }
#tagListFormatControl { width: min(360px, 100%); grid-template-columns: minmax(0, 1fr); justify-items: start; }
#tagListFormatControl select { max-width: 100%; }
#tagListFormatControl small { grid-column: 1; }
.missing-component-question { margin-bottom: 8px; font-size: 12px; }
.missing-component-question p { margin: 0 0 6px; color: var(--muted); }
.tag-group-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px 14px; max-height: 250px; overflow: auto; }
.tag-group-option { display: flex; align-items: flex-start; gap: 8px; padding: 6px 2px; color: var(--charcoal); font-size: 12px; cursor: pointer; }
.tag-group-option input { flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--green); }
.missing-tags { margin: 0 0 16px; border: 1px solid #e4caca; border-radius: 3px; background: #fffafa; }
.missing-tags-heading { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; border-bottom: 1px solid #eedede; }
.missing-tags-heading h3 { margin: 0; color: var(--charcoal); font-size: 14px; }
.missing-tags-heading > span { color: #b13e42; font-size: 13px; font-weight: 700; }
.missing-tags-list { display: grid; gap: 0; max-height: 230px; overflow: auto; margin: 0; padding: 0; list-style: none; }
.missing-tags-list li { display: grid; grid-template-columns: minmax(140px, 190px) minmax(220px, 1fr) minmax(180px, .8fr); gap: 8px 16px; padding: 8px 13px; border-bottom: 1px solid #f0e8e8; color: var(--charcoal); font-size: 12px; }
.missing-tags-list li:last-child { border-bottom: 0; }
.missing-tags-list strong { color: #9e3539; }
.missing-tags-list small { color: var(--muted); }
.missing-tags-empty { color: var(--muted) !important; }
.hidden { display: none; }
.small { font-size: 12px; color: var(--muted); }

/* Dark interface surfaces. Keep the TGML preview canvas light so the graphic
   itself continues to match the EBO display. */
body { color: var(--charcoal); }
.top { background: #000; border-bottom-color: #17191d; }
.hero p { color: #c2c6cc; }
.air-treatment-setup,
.system-profiles-panel,
.component-library-panel,
.binding-overview-panel,
.panel,
.stat { background: #22252a; border-color: var(--line); }
.drop,
.tag-group-questions { background: #1d2024; border-color: #60665b; }
.drop.drag { background: #29372a; border-color: var(--green); }
.component-profile-list,
.binding-overview-profile,
.component-library-option { background: #292c32; border-color: var(--line); }
.mode-menu select,
.scenario-picker select,
.scenario-picker input,
.system-profile-row select,
.component-library-search,
.binding-overview-search,
.tgml-preview-tools select,
.setup-parameters select,
.rule-question select,
.rule-question input,
.tgml-source {
  background: #17191d;
  color: var(--charcoal);
  border-color: #4a4e55;
}
select option { background: #202329; color: var(--charcoal); }
.setup-areas { border-color: var(--line); }
.button:not(.primary) { background: #2b2e34; color: #eceef1; border-color: #4a4e55; }
.button:not(.primary):hover { background: #34383f; border-color: var(--green); }
.button.primary { color: #fff; }
.button.primary:disabled { color: #fff; }
.filename { color: #a8d69a; }
.local { color: #a8d69a; }
.green, .component-library-option .all-bindings-match,
.component-binding-details .binding-match,
.binding-detail-active, .binding-status-available { color: #8fda7a; }
.yellow, .component-library-option .has-missing-bindings,
.component-binding-details .binding-missing,
.binding-detail-library, .binding-status-selectable { color: #ffd36c; }
.red, .binding-detail-missing, .binding-status-missing { color: #ff9292; }
.included-count { color: #91c9ee; }
.table th, .binding-overview-table th { background: #30343a; color: #f0f1f3; }
.table th, .table td, .binding-overview-table th, .binding-overview-table td { border-color: #3a3e44; }
.table tr.good, .binding-overview-table .binding-row-available { background: #243526; }
.table tr.typo, .binding-overview-table .binding-row-selectable { background: #3c341f; }
.table tr.bad, .binding-overview-table .binding-row-missing { background: #3b2628; }
.table tr.included { background: #26333d; }
.binding-overview-table .binding-row-outside { background: #292c32; }
.missing-tags { background: #302224; border-color: #654044; }
.missing-tags-heading { border-color: #654044; }
.missing-tags-list li { border-color: #463336; }
.missing-tags-list strong, .missing-tags-heading > span { color: #ff9292; }
input::placeholder { color: #858b93; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

@media (max-width: 700px) {
  .wrap { padding: 0 18px 60px; }
  .setup-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup-parameters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .top { align-items: flex-start; gap: 6px; flex-direction: column; padding: 8px 18px 0; }
  .top-tabs { width: 100%; flex: none; overflow-x: auto; }
  .top-tabs .step-button { flex: 1 0 auto; padding: 11px 10px 9px; }
  .mode-menu { width: 100%; }
  .brand img { width: 44px; height: 44px; }
  .actions { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
  .action-buttons { width: 100%; margin-left: 0; }
  .step2-heading { align-items: flex-start; flex-direction: column; }
  .tgml-preview, .tgml-preview svg { max-height: 65vh; }
  .tgml-source { min-height: 380px; }
  .tag-group-choices { grid-template-columns: 1fr; }
  .rule-questions { grid-template-columns: 1fr; }
  .system-profile-row { grid-template-columns: 44px minmax(0, 1fr); }
  .system-profile-row label:last-child { grid-column: 2; }
  .component-library-choices { grid-template-columns: 1fr; }
  .binding-overview-table { min-width: 680px; }
  .rule-question { grid-template-columns: minmax(0, 1fr) minmax(120px, 170px); }
  #tagListFormatControl { grid-template-columns: minmax(0, 1fr); }
  #tagListFormatControl small { grid-column: 1; }
  .missing-tags-list li { grid-template-columns: 1fr; gap: 4px; }
}













