/* Final owner for Technology Tree command geometry and sticky positioning. */
.technology-page .tree-workspace {
  --technology-sticky-command-top: calc(.45rem + var(--app-chrome-header-height, 60px) + var(--app-chrome-sticky-gap, .4rem));
  --technology-sticky-headings-top: calc(var(--technology-sticky-command-top) + var(--technology-command-sticky-height, 52px) + .25rem);
  --technology-sticky-content-top: calc(var(--technology-sticky-headings-top) + var(--technology-lane-heading-height) + .25rem);
  padding-bottom: 0;
}

.technology-page .tree-command.catalog-command--atlas {
  position: sticky;
  z-index: 130;
  top: var(--technology-sticky-command-top);
  align-self: start;
  width: 100%;
  margin-top: .35rem;
  padding: .25rem 0;
  overflow: visible;
  isolation: isolate;
  background: #051218;
  box-shadow: 0 4px 0 #051218, 0 10px 24px rgb(0 0 0 / 30%);
  backdrop-filter: blur(12px);
}

.technology-page .tree-command.catalog-command--atlas > .technology-command-row {
  position: relative;
  z-index: 1;
  display: grid;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  align-items: center;
  grid-template-columns: minmax(14rem, 1fr) minmax(8.5rem, 10rem) minmax(15rem, 19rem);
  gap: .45rem;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.technology-page .technology-command-row > *,
.technology-page .technology-command-row .technology-level-control > * {
  min-width: 0;
}

.technology-page .technology-command-row .catalog-search-form,
.technology-page .technology-command-row .atlas-search-control,
.technology-page .technology-command-row .atlas-search-control input,
.technology-page .technology-command-row .technology-filter-menu-mount,
.technology-page .technology-command-row .technology-filter-menu,
.technology-page .technology-command-row .technology-filter-menu > summary,
.technology-page .technology-command-row .technology-level-control,
.technology-page .technology-command-row .level-picker-trigger,
.technology-page .technology-command-row .atlas-reset {
  height: 44px;
  min-height: 44px;
}

.technology-page .technology-filter-menu-mount {
  position: relative;
  z-index: 2;
}

.technology-page .technology-filter-menu > summary {
  width: 100%;
  height: 44px; min-height: 44px; box-sizing: border-box; padding: .35rem .7rem;
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  color: var(--text); border: 1px solid rgb(61 104 113 / 33%); border-radius: 2px;
  background: rgb(6 20 26 / 56%); box-shadow: none;
  transition: border-color 170ms ease, background 170ms ease, box-shadow 170ms ease, transform 150ms ease;
}
.technology-page .technology-filter-menu > summary::after { flex: 0 0 var(--catalog-chevron-size, .68rem); }
.technology-page .technology-filter-menu > summary:is(:hover, :focus-visible),
.technology-page .technology-filter-menu[open] > summary { border-color: #69d9e6; background: linear-gradient(180deg, rgb(14 47 57 / 98%), rgb(9 32 41 / 98%)); box-shadow: inset 0 0 0 1px rgb(115 224 235 / 7%), 0 5px 18px rgb(0 0 0 / 22%); transform: translateY(-1px); }

.technology-page .technology-filter-menu > .catalog-options-custom {
  width: min(38rem, calc(100vw - 1rem));
  max-height: min(27rem, calc(100vh - var(--technology-sticky-command-top) - 4rem));
}

.technology-page .technology-filter-panel {
  display: grid;
  gap: .65rem;
}

.technology-page .technology-filter-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgb(105 208 217 / 22%);
  padding: .05rem .1rem .45rem;
}

.technology-page .technology-filter-panel__header h2,
.technology-page .technology-filter-group legend {
  color: #c8d9dc;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.technology-page .technology-filter-panel__header button {
  padding: .28rem .45rem;
  color: #9fdce1;
  border: 1px solid rgb(91 207 216 / 32%);
  background: #071820;
  font: inherit;
  font-size: .6rem;
  cursor: pointer;
}

.technology-page .technology-filter-panel__header button:is(:hover, :focus-visible) {
  color: #fff;
  border-color: #70f4ff;
  outline: 0;
}

.technology-page .technology-filter-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.technology-page .technology-filter-group legend { margin-bottom: .35rem; }

.technology-page .technology-type-filters,
.technology-page .technology-level-filters {
  display: grid;
  gap: .3rem;
}

.technology-page .technology-type-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.technology-page .technology-level-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.technology-page .technology-filter-choice,
.technology-page .technology-level-filters button {
  position: relative;
  min-height: 2rem;
  padding: .35rem .45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  color: #c8d9dc;
  border: 1px solid rgb(91 207 216 / 25%);
  background: #071820;
  font: inherit;
  font-size: .64rem;
  cursor: pointer;
}

.technology-page .technology-filter-choice:has(input:checked),
.technology-page .technology-level-filters button[aria-pressed="true"] {
  color: #fff;
  border-color: color-mix(in srgb, var(--filter-accent, #70f4ff) 65%, #45636a);
  background: color-mix(in srgb, var(--filter-accent, #70f4ff) 10%, #071820);
}

.technology-page .technology-filter-choice:is(:hover, :focus-within),
.technology-page .technology-level-filters button:is(:hover, :focus-visible) {
  border-color: var(--filter-accent, #70f4ff);
  outline: 0;
}

.technology-page .technology-filter-choice input { accent-color: var(--filter-accent, #70f4ff); }
.technology-page .technology-filter--ancient { --filter-accent: #df79f0; }

.technology-page .technology-range-fields {
  display: grid;
  margin-top: .4rem;
  align-items: end;
  grid-template-columns: minmax(4rem, 1fr) auto minmax(4rem, 1fr);
  gap: .35rem;
}

.technology-page .technology-range-fields label { min-width: 0; }
.technology-page .technology-range-fields label > span {
  display: block;
  margin-bottom: .18rem;
  color: #67bdc4;
  font-size: .52rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.technology-page .technology-range-fields input {
  width: 100%;
  height: 2rem;
  padding: .25rem .45rem;
  color: #e8f5f6;
  border: 1px solid rgb(91 207 216 / 28%);
  background: #041117;
}

.technology-page .technology-range-fields > span { padding-bottom: .45rem; color: var(--cyan); }

.technology-page .technology-command-row .technology-level-control {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .35rem;
}

.technology-page .technology-command-row .technology-level-control .atlas-reset {
  inset: auto;
  align-self: stretch;
}

.technology-page .technology-command-row .level-picker { z-index: 180; }
.technology-page .technology-active-filters[hidden] { display: none !important; }
.technology-page .technology-active-filters:not([hidden]) {
  min-height: 32px;
  margin: -.35rem 0 0;
  padding: .2rem 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
}

.technology-page .technology-active-filters .active-filter-chip {
  min-height: 28px;
  padding: .22rem .48rem;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: #dcebed;
  border: 1px solid rgb(81 232 242 / 32%);
  border-radius: 3px;
  background: rgb(13 77 87 / 26%);
  font-size: .62rem;
}

.technology-page .technology-active-filters .active-filter-chip:is(:hover, :focus-visible) { color: #fff; border-color: rgb(98 231 237 / 72%); outline: 0; }
.technology-page .technology-active-filters .active-filter-chip span { display: inline-flex; color: var(--cyan); }
.technology-page .technology-active-filters .active-filter-chip svg { width: .68rem; height: .68rem; fill: none; stroke: currentColor; stroke-width: 2; }
.technology-page .technology-lane-headings { z-index: 115; top: var(--technology-sticky-headings-top); }
.technology-page .technology-lane-headings[data-mode="regular"],
.technology-page .technology-lane-headings[data-mode="ancient"] { grid-template-columns: minmax(0, 1fr); }
.technology-page .technology-lane-headings > [hidden] { display: none !important; }
.technology-page .level-section[data-mode="regular"] .technology-columns,
.technology-page .level-section[data-mode="ancient"] .technology-columns {
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
}
.technology-page .level-section[data-mode="ancient"] .technology-lane--ancient {
  width: 100%;
  border-left: 0;
}
.technology-page .level-section[data-mode="ancient"] .technology-grid--ancient {
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 10.5rem));
  justify-content: start;
}

/* Single-lane modes own the complete painted surface; the dual split remains only in both mode. */
.technology-page .tree-workspace[data-mode="regular"] .technology-levels::before {
  background:
    repeating-linear-gradient(120deg, transparent 0 290px, rgba(164, 188, 195, .05) 290px 440px, transparent 440px 730px),
    repeating-linear-gradient(60deg, transparent 0 290px, rgba(164, 188, 195, .035) 290px 440px, transparent 440px 730px),
    #102f38;
  -webkit-mask-image: none;
  mask-image: none;
}

.technology-page .tree-workspace[data-mode="ancient"] .technology-levels::before {
  background:
    repeating-linear-gradient(120deg, transparent 0 290px, rgba(222, 164, 235, .055) 290px 440px, transparent 440px 730px),
    repeating-linear-gradient(60deg, transparent 0 290px, rgba(222, 164, 235, .04) 290px 440px, transparent 440px 730px),
    #2b113a;
  -webkit-mask-image: none;
  mask-image: none;
}

.technology-page .tree-workspace[data-mode="ancient"] .level-rail::before {
  background: #df79f0;
  box-shadow: 0 0 8px rgb(223 121 240 / 62%);
}

.technology-page .tree-workspace[data-mode="ancient"] .level-marker,
.technology-page .tree-workspace[data-mode="ancient"] .level-section:first-child .level-marker {
  color: #ef9dff;
  border-color: #df79f0;
  background: #32153f;
  box-shadow: 0 0 23px rgb(223 121 240 / 66%), inset 0 0 21px rgb(223 121 240 / 17%);
}

.technology-page .tree-workspace[data-mode="ancient"] .level-marker::after,
.technology-page .tree-workspace[data-mode="ancient"] .level-section:first-child .level-marker::after {
  color: #ef9dff;
  text-shadow: 0 0 10px rgb(223 121 240 / 80%);
}

@media (max-width: 780px) {
  .technology-page .technology-lane[data-empty="true"] {
    display: none;
  }

  .technology-page .tree-command.catalog-command--atlas > .technology-command-row {
    height: 92px;
    min-height: 92px;
    grid-template-columns: minmax(8rem, 1fr) minmax(9rem, 12rem);
    grid-template-rows: 44px 44px;
  }
  .technology-page .technology-command-row .catalog-search-form { grid-column: 1 / -1; }
  .technology-page .technology-command-row .technology-filter-menu > .catalog-options-custom {
    width: min(30rem, calc(100vw - 1rem));
  }

  .technology-page .level-section[data-mode="ancient"] .technology-grid--ancient,
  .technology-page .level-section--ancient-only .technology-grid--ancient {
    grid-template-columns: repeat(auto-fit, minmax(6.4rem, 7.4rem));
    justify-content: start;
  }
}

@media (max-width: 480px) {
  .technology-page .tree-command.catalog-command--atlas > .technology-command-row {
    height: 140px;
    min-height: 140px;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 44px);
  }
  .technology-page .technology-level-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .technology-page .technology-filter-menu > .catalog-options-custom { left: 0; width: calc(100vw - 1rem); }
}

@media (max-width: 560px) {
  .technology-page .technology-level-control > .level-picker,
  .technology-page .technology-level-control > .level-picker.is-above {
    position: absolute;
    z-index: 240;
    inset: auto 0;
    top: calc(100% + .4rem);
    width: auto;
    max-height: min(70dvh, 34rem);
    border-right: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
    border-left: 1px solid var(--line-strong);
    border-radius: 0 0 8px 8px;
  }
}
