:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #06100e;
  color: #edf4ef;
  --topbar-height: 4.25rem;
  --muted: #a8b9b2;
  --line: rgba(237, 244, 239, 0.16);
  --line-strong: rgba(237, 244, 239, 0.34);
  --surface: rgba(7, 20, 17, 0.9);
  --surface-solid: #0a1916;
  --green: #67d29a;
  --blue: #70b5df;
  --focus: #fff1ad;
  --minimum-touch-target: 44px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #06100e;
}

button,
input,
select,
a {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: #c2ecd4;
  text-underline-offset: 0.2em;
}

.secondary-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: var(--minimum-touch-target);
  min-inline-size: var(--minimum-touch-target);
  max-inline-size: 100%;
  padding: 0.45rem 0.78rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(7, 22, 18, 0.92);
  color: #c2ecd4;
  font-weight: 720;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: center;
  text-decoration: none;
}

.secondary-back-link:hover {
  border-color: var(--green);
  background: #102c25;
  color: #edf4ef;
}

:focus-visible {
  outline: 0.19rem solid var(--focus);
  outline-offset: 0.18rem;
}

html[data-input-modality="pointer"] :focus {
  outline: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-block-size: var(--minimum-touch-target);
  top: 0.75rem;
  left: 0.75rem;
  max-inline-size: calc(100vw - 1.5rem);
  padding: 0.65rem 0.85rem;
  border-radius: 0.65rem;
  background: #edf4ef;
  color: #06100e;
  overflow-wrap: anywhere;
  transform: translateY(-180%);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

.app-shell {
  min-height: 100dvh;
}

.topbar {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto;
  height: calc(var(--topbar-height) + env(safe-area-inset-top));
  padding: calc(0.65rem + env(safe-area-inset-top)) max(0.85rem, env(safe-area-inset-right)) 0.65rem max(0.85rem, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: auto minmax(12rem, 31rem) auto auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 16, 14, 0.86);
  backdrop-filter: blur(1rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: fit-content;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.35rem;
  color: inherit;
  font-weight: 780;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand-mark {
  width: 1rem;
  aspect-ratio: 1;
  border: 2px solid var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 0.28rem rgba(103, 210, 154, 0.12);
}

.search-control {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.search-control input {
  width: 100%;
  height: 2.75rem;
  min-height: 2.75rem;
  padding: 0 2.8rem 0 2.45rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(11, 28, 24, 0.92);
  color: inherit;
  appearance: none;
}

.search-control input::-webkit-search-cancel-button {
  display: none;
}

.search-symbol {
  position: absolute;
  left: 0.9rem;
  z-index: 1;
  color: var(--muted);
  font-size: 1.2rem;
  pointer-events: none;
}

.search-clear {
  position: absolute;
  right: 0.2rem;
  width: 2.75rem;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.icon-button,
.layer-view-button,
.orientation-bar button,
.layer-filter,
.layer-project,
.catalog-select,
.presentation-choices button {
  border: 1px solid var(--line-strong);
  background: rgba(7, 22, 18, 0.92);
  cursor: pointer;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 50%;
  font-size: 1.25rem;
}

.settings-toggle {
  justify-self: end;
}

.proposal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(7, 22, 18, 0.92);
  color: #c2ecd4;
  font-size: 0.84rem;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.proposal-link:hover {
  border-color: var(--green);
  color: #edf4ef;
}

.proposal-symbol {
  font-size: 1.15rem;
  line-height: 1;
}

.globe-surface,
.globe-stage {
  width: 100%;
  height: 100dvh;
}

.globe-stage {
  position: relative;
  margin: 0;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at center, rgba(36, 95, 78, 0.2), transparent 48%),
    #071411;
}

.globe-map {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, #173a3d 0 30%, #0d2426 48%, #071310 73%);
}

.globe-map .maplibregl-canvas {
  outline: none;
}

.globe-stage[data-visual-ready="false"] .globe-map .maplibregl-canvas,
.globe-stage[data-visual-ready="false"] .digital-sphere {
  opacity: 0 !important;
  pointer-events: none !important;
}

.globe-stage[data-visual-ready="true"] .globe-map .maplibregl-canvas {
  opacity: 1;
  transition: opacity 240ms ease-out;
}

.maplibregl-ctrl-bottom-left,
.maplibregl-ctrl-bottom-right {
  z-index: 14;
  bottom: max(3.4rem, env(safe-area-inset-bottom));
}

.maplibregl-ctrl-attrib {
  max-width: min(76vw, 40rem);
  font-size: 0.7rem;
}

.maplibregl-ctrl-group button {
  width: 2.75rem;
  height: 2.75rem;
}

.maplibregl-ctrl-attrib-button {
  width: 2.75rem !important;
  height: 2.75rem !important;
}

.digital-sphere {
  --sphere-opacity: 1;
  position: absolute;
  z-index: 4;
  left: var(--sphere-x, 50%);
  top: var(--sphere-y, 50%);
  width: var(--sphere-size, min(78vw, 78vh));
  height: var(--sphere-size, min(78vw, 78vh));
  overflow: visible;
  transform: translate(-50%, -50%);
  opacity: var(--sphere-opacity);
  pointer-events: none;
  transition: opacity 160ms linear;
}

.digital-sphere[data-hidden-local] {
  visibility: hidden;
}

#sphere-paths path {
  fill: none;
}


.sphere-edge-control {
  pointer-events: stroke;
  cursor: pointer;
  touch-action: manipulation;
}

.sphere-edge-control:focus {
  outline: none;
}

.sphere-edge-focus {
  fill: none;
  stroke: rgba(103, 210, 154, 0.58);
  stroke-width: 2;
  stroke-dasharray: 1 12;
  display: none;
  pointer-events: none;
}


.layer-view-button {
  position: absolute;
  z-index: 18;
  top: calc(var(--topbar-height) + env(safe-area-inset-top) + 0.8rem);
  right: max(0.85rem, env(safe-area-inset-right));
  min-height: 2.75rem;
  padding: 0.62rem 0.84rem;
  border-radius: 999px;
  font-weight: 730;
  backdrop-filter: blur(0.75rem);
}

.layer-view-button[aria-expanded="true"] {
  border-color: var(--green);
  color: var(--green);
}

.orientation-bar {
  position: absolute;
  z-index: 18;
  left: max(0.85rem, env(safe-area-inset-left));
  bottom: max(0.9rem, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  max-width: min(46rem, calc(100% - 1.7rem));
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(6, 18, 15, 0.83);
  color: var(--muted);
  font-size: 0.78rem;
  backdrop-filter: blur(0.75rem);
}

.semantic-summary {
  max-width: min(30rem, 56vw);
  overflow: hidden;
  padding-right: 0.35rem;
  color: #d1ddd6;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orientation-bar button {
  min-height: 2.75rem;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  color: #edf4ef;
  font-weight: 720;
}

.map-legend {
  position: absolute;
  z-index: 18;
  left: max(0.85rem, env(safe-area-inset-left));
  top: calc(var(--topbar-height) + env(safe-area-inset-top) + 0.8rem);
  width: min(23rem, calc(100% - 1.7rem));
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: rgba(6, 18, 15, 0.88);
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
  -webkit-backdrop-filter: blur(0.75rem);
  backdrop-filter: blur(0.75rem);
}

.map-legend > summary {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.7rem;
  color: #edf4ef;
  font-weight: 720;
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
}

.map-legend > summary::-webkit-details-marker {
  display: none;
}

.map-legend > summary::after {
  content: '+';
  font-size: 1rem;
  font-weight: 600;
}

.map-legend[open] > summary::after {
  content: '−';
}

.legend-body {
  max-height: min(26rem, 56vh);
  overflow: auto;
  padding: 0 0.7rem 0.7rem;
  overscroll-behavior: contain;
}

.legend-note,
.legend-precision {
  margin: 0.25rem 0 0.65rem;
}

.legend-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend-item {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.42rem;
}

.legend-color {
  display: inline-grid;
  width: 1.55rem;
  height: 1.35rem;
  flex: 0 0 1.55rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 0.38rem;
  background-color: var(--legend-color, #9ca3af);
}

.legend-semantics {
  display: grid;
  gap: 0.32rem;
  margin: 0.72rem 0 0;
  padding: 0.65rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.legend-semantics li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-semantic-mark {
  display: inline-grid;
  min-width: 1.55rem;
  height: 1.35rem;
  place-items: center;
  border: 1px solid #ffffff;
  border-radius: 0.38rem;
  color: #ffffff;
  font-weight: 800;
  line-height: 1;
}

.legend-semantic-mark--coverage {
  background: radial-gradient(circle, #e7eee9 0 1px, transparent 1.25px) 0 0 / 4px 4px, #284348;
}

.legend-semantic-mark--count {
  background: #102426;
}

.legend-semantic-mark--withheld {
  background: #66727a;
  font-size: 1rem;
}

.map-status {
  position: absolute;
  z-index: 15;
  left: 50%;
  bottom: max(0.95rem, env(safe-area-inset-bottom));
  max-width: min(44rem, calc(100% - 18rem));
  margin: 0;
  padding: 0.44rem 0.65rem;
  border-radius: 0.65rem;
  background: rgba(6, 18, 15, 0.76);
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
  backdrop-filter: blur(0.6rem);
}

.globe-stage[data-runtime-state="ready"] .map-status {
  opacity: 0.74;
}

.globe-stage[data-runtime-state="degraded"] .map-status,
.globe-stage[data-runtime-state="failed"] .map-status {
  border: 1px solid rgba(224, 173, 105, 0.55);
  color: #ffe1a8;
}

.globe-results {
  position: absolute;
  z-index: 18;
  top: calc(var(--topbar-height) + env(safe-area-inset-top) + 0.8rem);
  left: max(0.85rem, env(safe-area-inset-left));
  max-width: min(28rem, calc(100% - 12rem));
  margin: 0;
  padding: 0.58rem 0.78rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 18, 15, 0.82);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
  pointer-events: none;
  backdrop-filter: blur(0.75rem);
}

.globe-results[data-empty] {
  border-color: rgba(224, 173, 105, 0.7);
  color: #ffe1a8;
}

/* Keep the globe itself visually primary: explanatory status text remains
   available to assistive technology, while only actionable/exception states
   occupy map space. */
.map-legend:not([open]) {
  width: auto;
}

.semantic-summary,
.globe-results:not([data-empty]) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.method-page {
  min-height: 100%;
  overflow: auto;
  background: #071411;
}

.method-page main {
  width: min(52rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 6rem;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.method-page section {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.method-page h1,
.method-page h2 {
  line-height: 1.15;
}

.method-page p {
  color: var(--muted);
  line-height: 1.65;
}

.method-page a {
  color: var(--green);
}

.method-page a:not(.secondary-back-link),
.settings-section a {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--minimum-touch-target);
  padding-block: 0.22rem;
}

.language-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.language-switch a {
  justify-content: center;
  min-inline-size: var(--minimum-touch-target);
  padding: 0.45rem 0.72rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(7, 22, 18, 0.72);
  color: #c2ecd4;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.language-switch a:hover {
  border-color: var(--green);
  background: #102c25;
  color: #edf4ef;
}

.language-switch a[aria-current="page"] {
  border-color: var(--green);
  background: rgba(79, 255, 178, 0.14);
  color: #edf4ef;
}

.language-switch--settings {
  display: grid;
  gap: 0.55rem;
}

.language-switch--settings .language-choice--auto {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  border-radius: 0.72rem;
}

.language-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.language-switch--settings .language-choice {
  display: flex;
  min-width: 0;
  min-height: 3.2rem;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.22rem;
  border-radius: 0.72rem;
  text-align: start;
}

.language-choice-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.language-choice-status {
  display: inline-flex;
  min-height: 1.35rem;
  align-items: center;
  padding: 0.1rem 0.38rem;
  border: 1px solid rgba(255, 225, 168, 0.38);
  border-radius: 999px;
  color: #ffe1a8;
  font-size: 0.67rem;
  font-weight: 720;
  letter-spacing: 0.02em;
  line-height: 1;
}

.language-choice[data-locale-status="candidate"] {
  border-style: dashed;
}

.language-choice[data-locale-status="candidate"][aria-current="page"] {
  border-style: solid;
}

.language-switch--compact .language-choice-status {
  margin-inline-start: 0.2rem;
}

.language-effective {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

@media (max-width: 32rem) {
  .language-choice-grid {
    grid-template-columns: 1fr;
  }
}


.method-page code {
  color: #edf4ef;
}

.layer-panel,
.settings-panel,
.project-focus {
  border: 1px solid var(--line);
  background: rgba(7, 21, 17, 0.96);
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(1rem);
}

.layer-panel {
  position: absolute;
  z-index: 22;
  inset: calc(var(--topbar-height) + env(safe-area-inset-top)) 0 0 auto;
  width: min(27rem, 88vw);
  padding: 1.15rem;
  overflow: auto;
  border-width: 0 0 0 1px;
}

.layer-panel > p,
.settings-section p,
.text-header > p,
.machine-note {
  color: var(--muted);
  line-height: 1.55;
}

.globe-stage.layer-view-open .digital-sphere {
  opacity: 0.12;
}

.layer-stack-visual {
  position: absolute;
  z-index: 8;
  left: var(--sphere-x, 50%);
  top: var(--sphere-y, 50%);
  width: var(--sphere-size, min(70vw, 70vh));
  aspect-ratio: 1;
  opacity: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: opacity 180ms linear;
}

.globe-stage.layer-view-open .layer-stack-visual {
  opacity: 1;
}

.layer-stack-item {
  position: absolute;
  top: 50%;
  left: 7%;
  right: 7%;
  height: 19%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.25rem 0.9rem;
  border: 1px solid rgba(195, 231, 248, 0.55);
  border-radius: 50%;
  color: rgba(237, 244, 239, 0.86);
  font-size: clamp(0.58rem, 1.1vw, 0.76rem);
  line-height: 1.15;
  text-shadow: 0 1px 0.5rem #06100e;
}

.layer-stack-item small {
  color: var(--muted);
  font: inherit;
}

.layer-stack-item:nth-child(1) { transform: translateY(-175%); border-color: rgba(112, 181, 223, 0.72); }
.layer-stack-item:nth-child(2) { transform: translateY(-115%); border-color: rgba(103, 210, 154, 0.72); }
.layer-stack-item:nth-child(3) { transform: translateY(-55%); border-color: rgba(224, 173, 105, 0.72); }
.layer-stack-item:nth-child(4) { transform: translateY(5%); border-color: rgba(197, 158, 232, 0.72); }
.layer-stack-item:nth-child(5) { transform: translateY(65%); border-color: rgba(116, 216, 207, 0.72); }
.layer-stack-item:nth-child(6) { transform: translateY(125%); border-color: rgba(220, 228, 224, 0.58); }

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.panel-heading h2,
.panel-heading p {
  margin-top: 0;
}

.panel-heading h2 {
  margin-bottom: 0.4rem;
}

.kicker {
  margin: 0 0 0.5rem;
  color: var(--green);
  font-size: 0.73rem;
  font-weight: 760;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.layer-buttons,
.layer-projects,
.presentation-choices {
  display: grid;
  gap: 0.55rem;
}

.layer-buttons {
  margin: 1rem 0 1.2rem;
}

.layer-filter,
.layer-project,
.presentation-choices button {
  width: 100%;
  padding: 0.72rem 0.8rem;
  border-radius: 0.75rem;
  text-align: left;
}

.layer-filter[aria-pressed="true"],
.layer-project[aria-pressed="true"],
.catalog-select[aria-pressed="true"],
.presentation-choices button.is-selected {
  border-color: var(--focus);
  background: rgba(255, 241, 173, 0.1);
  color: var(--focus);
}

.layer-project {
  display: grid;
  gap: 0.18rem;
}

.layer-project span {
  font-weight: 730;
}

.layer-project small {
  color: var(--muted);
}

.settings-panel {
  position: fixed;
  z-index: 70;
  top: calc(var(--topbar-height) + env(safe-area-inset-top) + 0.7rem);
  right: max(0.8rem, env(safe-area-inset-right));
  width: min(24rem, calc(100vw - 1.6rem));
  max-height: calc(100dvh - var(--topbar-height) - env(safe-area-inset-top) - 1.4rem);
  padding: 1rem;
  overflow: auto;
  border-radius: 1rem;
}

.presentation-choices button {
  display: grid;
  gap: 0.16rem;
}

.presentation-choices span {
  color: var(--muted);
  font-size: 0.84rem;
}

.settings-section {
  margin-top: 1.3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.settings-section h3 {
  margin: 0 0 0.45rem;
}

.settings-section ul {
  padding-left: 1.15rem;
}

.text-view,
.static-catalog-fallback {
  min-height: 100dvh;
  padding: calc(var(--topbar-height) + env(safe-area-inset-top) + 2.2rem) max(1rem, env(safe-area-inset-right)) max(3rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  overflow: auto;
  background:
    radial-gradient(circle at 50% 0, rgba(56, 116, 91, 0.18), transparent 34rem),
    #07100f;
}

.text-view {
  height: 100dvh;
}

@keyframes static-catalog-fallback-reveal {
  to {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

.static-catalog-fallback {
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100%;
  height: 100dvh;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  animation: static-catalog-fallback-reveal 0s linear 1s forwards;
}

.static-catalog-fallback:target,
.static-catalog-fallback[data-skip-activated="true"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: none;
}

.text-header {
  max-width: 52rem;
  margin: 0 auto 2rem;
}

.text-header h1,
.static-catalog-fallback h1 {
  max-width: 18ch;
  margin: 0 0 0.7rem;
  font-size: clamp(2rem, 6vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.text-count {
  font-weight: 760;
}

.text-layout {
  width: min(78rem, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(15rem, 20rem) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.text-filters {
  position: sticky;
  top: calc(var(--topbar-height) + 1rem);
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(10, 25, 21, 0.82);
}

.text-filters h2 {
  margin: 0;
  font-size: 1.05rem;
}

.machine-note {
  margin-bottom: 0;
  font-size: 0.83rem;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1rem;
}

.catalog-card {
  display: flex;
  flex-direction: column;
  min-height: 16rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(12, 29, 25, 0.86);
}

.catalog-card[data-selected] {
  border-color: var(--focus);
  box-shadow: 0 0 0 1px rgba(255, 241, 173, 0.2);
}

.catalog-kind {
  margin: 0 0 0.55rem;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.catalog-card h2 {
  margin: 0 0 0.6rem;
  font-size: 1.35rem;
}

.catalog-card > p:not(.catalog-kind) {
  color: var(--muted);
  line-height: 1.52;
}

.catalog-card .catalog-location {
  margin-top: 0.35rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

.catalog-card .catalog-activity-notice {
  margin: 0.45rem 0 0;
  padding: 0.55rem 0.65rem;
  border-left: 3px solid var(--focus);
  background: rgba(255, 241, 173, 0.08);
  color: var(--text);
  font-size: 0.78rem;
}

.catalog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-top: auto;
  padding-top: 1rem;
}

.catalog-select {
  min-height: 2.75rem;
  padding: 0.52rem 0.66rem;
  border-radius: 0.65rem;
  font-weight: 720;
}

.text-empty {
  padding: 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: 0.8rem;
  color: var(--muted);
}

.project-focus {
  position: fixed;
  z-index: 60;
  left: max(0.8rem, env(safe-area-inset-left));
  bottom: max(0.8rem, env(safe-area-inset-bottom));
  width: min(35rem, calc(100vw - 1.6rem));
  max-height: min(38rem, calc(100dvh - var(--topbar-height) - 1.6rem));
  padding: clamp(1rem, 2vw, 1.4rem);
  overflow: auto;
  border-radius: 1rem;
  background:
    radial-gradient(circle at 6% 8%, color-mix(in srgb, var(--focus) 9%, transparent), transparent 30%),
    linear-gradient(145deg, rgba(8, 29, 24, 0.98), rgba(5, 18, 15, 0.96));
}

.project-focus .panel-heading {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(160, 205, 188, 0.18);
}

.project-focus .panel-heading h2 {
  max-width: 24ch;
  margin: 0;
  color: var(--focus);
  font-size: clamp(1.55rem, 4vw, 2.65rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.focus-summary {
  max-width: 68ch;
  margin: 1rem 0;
  color: rgba(237, 244, 239, 0.86);
  font-size: 0.98rem;
  line-height: 1.6;
}

.focus-selection-status {
  margin: 0 0 0.9rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--focus) 28%, transparent);
  border-radius: 0.7rem;
  background: color-mix(in srgb, var(--focus) 7%, transparent);
  color: rgba(237, 244, 239, 0.82);
  font-size: 0.82rem;
  line-height: 1.45;
}

.catalog-detail-integrity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 0.8rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--focus) 22%, transparent);
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--focus) 6%, transparent);
  color: rgba(237, 244, 239, 0.8);
  font-size: 0.78rem;
  line-height: 1.45;
}

.catalog-detail-integrity[hidden] {
  display: none;
}

.catalog-detail-integrity p {
  flex: 1 1 14rem;
  margin: 0;
  padding: 0;
}

.catalog-detail-retry {
  min-height: 2.25rem;
  padding: 0.4rem 0.65rem;
  white-space: nowrap;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.focus-grid section {
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid rgba(160, 205, 188, 0.16);
  border-radius: 0.8rem;
  background: rgba(4, 15, 13, 0.45);
}

.focus-grid h3 {
  margin: 0 0 0.55rem;
  color: rgba(225, 239, 232, 0.92);
  font-size: 0.78rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.focus-grid ul,
.focus-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.focus-grid ul {
  padding-left: 1.1rem;
}

.focus-grid p {
  padding: 0;
}

.focus-grid a {
  color: var(--focus);
  text-underline-offset: 0.18em;
}

@media (max-width: 48rem) {
  :root {
    --topbar-height: 3.85rem;
  }

  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 0.55rem;
  }

  .brand span:last-child {
    display: none;
  }

  .proposal-link {
    width: 2.75rem;
    min-width: 2.75rem;
    padding: 0;
    border-radius: 50%;
  }

  .proposal-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .search-control input {
    height: 2.75rem;
  }

  .layer-view-button {
    top: calc(var(--topbar-height) + env(safe-area-inset-top) + 0.55rem);
    right: 0.55rem;
  }

  .layer-stack-item {
    padding-inline: 0.45rem;
  }

  .layer-stack-item span {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .layer-panel {
    inset: auto 0 0;
    width: 100%;
    max-height: 58dvh;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: 1rem 1rem 0 0;
  }

  .map-status {
    display: block;
    bottom: max(4.35rem, calc(env(safe-area-inset-bottom) + 3.7rem));
    max-width: calc(100% - 7rem);
    font-size: 0.7rem;
  }

  .globe-results {
    top: calc(var(--topbar-height) + env(safe-area-inset-top) + 0.55rem);
    left: 0.55rem;
    max-width: calc(100% - 10rem);
    padding: 0.5rem 0.65rem;
    border-radius: 0.7rem;
    font-size: 0.72rem;
  }

  .orientation-bar {
    right: 0.55rem;
    bottom: max(0.65rem, env(safe-area-inset-bottom));
    max-width: none;
  }

  .maplibregl-ctrl-bottom-right {
    bottom: calc(max(0.65rem, env(safe-area-inset-bottom)) + var(--orientation-bar-height, 5.2rem) + 0.45rem);
  }

  .semantic-summary {
    flex: 1 0 100%;
    max-width: none;
    padding: 0 0.5rem 0.25rem;
    font-size: 0.68rem;
    white-space: normal;
  }

  .text-layout {
    grid-template-columns: 1fr;
  }

  .text-filters {
    position: static;
  }

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

@media (max-width: 28rem) {
  .topbar {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }

  .search-symbol {
    left: 0.72rem;
  }

  .search-control input {
    padding-left: 2rem;
    font-size: 0.92rem;
  }

  .layer-view-button {
    font-size: 0.85rem;
  }
}


/* One spatial object: stable overview sphere and a full-screen side-view journey. */
.globe-map {
  transform-origin: 50% 50%;
  transition: opacity 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.digital-sphere {
  transition: opacity 360ms linear;
}

#sphere-rings use {
  fill: none;
  stroke: rgba(112, 181, 223, 0.18);
  stroke-width: 1.05;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  transition:
    stroke 520ms ease,
    stroke-width 520ms ease,
    opacity 520ms ease;
}

/* Each path-based ring plane orbits as one line, child-ring and label object. */
@keyframes sphere-ring-orbit {
  from {
    transform: rotate(var(--ring-orbit-start-angle, 0deg));
  }

  to {
    transform: rotate(calc(var(--ring-orbit-start-angle, 0deg) + var(--ring-orbit-direction, 1) * 360deg));
  }
}

.sphere-ring-plane {
  transform-box: view-box;
  transform-origin: 320px 320px;
  transform: rotate(var(--ring-orbit-start-angle, 0deg));
  animation: sphere-ring-orbit var(--ring-orbit-duration, 240s) linear infinite;
}

.globe-stage[data-map-moving="true"] .sphere-ring-plane,
.digital-sphere:has(.sphere-edge-control:focus) .sphere-ring-plane,
.digital-sphere:has(.sphere-edge-control:active) .sphere-ring-plane {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .sphere-ring-plane {
    animation: none;
    transform: rotate(var(--ring-orbit-start-angle, 0deg));
  }
}

#sphere-rings use[data-layer-id="knowledge_data"] { stroke: rgba(123, 195, 238, 0.34); }
#sphere-rings use[data-layer-id="software_infrastructure"] { stroke: rgba(112, 225, 165, 0.3); stroke-dasharray: 1 7; }
#sphere-rings use[data-layer-id="media_culture"] { stroke: rgba(239, 183, 109, 0.28); stroke-dasharray: 12 10; }
#sphere-rings use[data-layer-id="learning_education"] { stroke: rgba(207, 169, 239, 0.3); stroke-dasharray: 4 8; }
#sphere-rings use[data-layer-id="communication_networks"] { stroke: rgba(124, 226, 216, 0.3); stroke-dasharray: 18 9 2 9; }
#sphere-rings use[data-layer-id="mixed_other"] { stroke: rgba(226, 235, 231, 0.22); stroke-dasharray: 2 11; }
#sphere-rings use[data-layer-id="knowledge_learning_culture"],
#sphere-rings use[data-layer-id="open_knowledge_data"],
#sphere-rings use[data-layer-id="learning_education"],
#sphere-rings use[data-layer-id="media_culture"],
#sphere-rings use[data-layer-id="knowledge_learning_bridge"] { stroke: rgba(123, 195, 238, 0.34); }
#sphere-rings use[data-layer-id="software_tools_production"],
#sphere-rings use[data-layer-id="free_software"],
#sphere-rings use[data-layer-id="open_hardware_production"],
#sphere-rings use[data-layer-id="shared_platforms_tools"],
#sphere-rings use[data-layer-id="knowledge_software_bridge"] { stroke: rgba(112, 225, 165, 0.3); stroke-dasharray: 1 7; }
#sphere-rings use[data-layer-id="community_networks"],
#sphere-rings use[data-layer-id="federated_protocols"],
#sphere-rings use[data-layer-id="network_coordination"] { stroke: rgba(124, 226, 216, 0.3); stroke-dasharray: 18 9 2 9; }
#sphere-rings use[data-layer-id="provision_land_ecology"],
#sphere-rings use[data-layer-id="food_seed_agriculture"],
#sphere-rings use[data-layer-id="water_irrigation"],
#sphere-rings use[data-layer-id="renewable_energy"],
#sphere-rings use[data-layer-id="health_software"],
#sphere-rings use[data-layer-id="land_ecology"],
#sphere-rings use[data-layer-id="food_distribution_platforms"],
#sphere-rings use[data-layer-id="energy_cooperatives"],
#sphere-rings use[data-layer-id="watershed_food_systems"] { stroke: rgba(239, 183, 109, 0.3); stroke-dasharray: 12 10; }
#sphere-rings use[data-layer-id="cooperation_self_organization"],
#sphere-rings use[data-layer-id="cooperative_governance"],
#sphere-rings use[data-layer-id="civic_technology"],
#sphere-rings use[data-layer-id="mutual_local_self_help"] { stroke: rgba(207, 169, 239, 0.3); stroke-dasharray: 4 8; }

.globe-stage[data-view-phase="entering-layers"] .globe-map,
.globe-stage[data-view-phase="settling-layers"] .globe-map,
.globe-stage[data-view-phase="preparing-overview"] .globe-map {
  opacity: 0;
  transform: none;
}

.globe-stage[data-view-phase="layers"] .globe-map {
  opacity: 0;
  transform: none;
  pointer-events: none;
}

.globe-stage[data-view-phase="leaving-layers"] .globe-map {
  opacity: 1;
  transform: none;
}

.globe-stage.layer-view-open .orientation-bar,
.globe-stage.layer-view-open .map-legend,
.globe-stage.layer-view-open .globe-results,
.globe-stage.layer-view-open .layer-view-button,
.globe-stage.layer-view-open .maplibregl-ctrl-container {
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.globe-stage.layer-view-open[data-runtime-state="ready"] .map-status {
  opacity: 0;
}

.layer-stack-visual {
  left: 50%;
  top: 50%;
  pointer-events: none;
  transition: opacity 420ms ease;
}

.layer-stack-item {
  left: 9%;
  right: 9%;
  height: auto;
  min-height: 2rem;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border: 0;
  border-radius: 0.6rem;
  background: linear-gradient(90deg, rgba(5, 17, 15, 0.82), rgba(5, 17, 15, 0.18) 46%, rgba(5, 17, 15, 0.82));
  font-size: clamp(0.64rem, 1.05vw, 0.84rem);
}

.layer-stack-item:nth-child(1) { top: 22%; transform: none; }
.layer-stack-item:nth-child(2) { top: 32.3%; transform: none; }
.layer-stack-item:nth-child(3) { top: 42.6%; transform: none; }
.layer-stack-item:nth-child(4) { top: 53%; transform: none; }
.layer-stack-item:nth-child(5) { top: 63.3%; transform: none; }
.layer-stack-item:nth-child(6) { top: 73.6%; transform: none; }

.layer-panel {
  inset: calc(var(--topbar-height) + env(safe-area-inset-top)) 0 0;
  width: 100%;
  padding: 1rem max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  overflow: hidden;
  border: 0;
  background:
    linear-gradient(180deg, rgba(5, 16, 14, 0.9), rgba(5, 16, 14, 0.12) 24%, rgba(5, 16, 14, 0.08) 68%, rgba(5, 16, 14, 0.94));
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 260ms ease,
    visibility 0s linear 260ms;
}

.layer-panel[data-visible] {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.layer-panel[data-closing] {
  opacity: 0;
  transition: opacity 260ms ease;
}

.layer-panel .panel-heading,
.layer-panel > p {
  width: min(42rem, calc(100% - 1rem));
  pointer-events: auto;
}

.layer-panel .panel-heading {
  position: relative;
  z-index: 2;
}

.layer-panel > p {
  margin-top: 0.35rem;
  max-width: 34rem;
}

.layer-panel .layer-buttons {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: max(5.2rem, calc(env(safe-area-inset-bottom) + 4.6rem));
  width: min(74rem, calc(100% - 2rem));
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.42rem;
  margin: 0;
  transform: translateX(-50%);
  pointer-events: auto;
}

.layer-panel .layer-filter {
  width: auto;
  min-height: 2.75rem;
  padding: 0.55rem 0.72rem;
  border-radius: 999px;
  background: rgba(7, 23, 19, 0.9);
  white-space: nowrap;
}

.layer-panel .layer-projects {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  width: min(76rem, calc(100% - 2rem));
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.1rem 0 0.3rem;
  transform: translateX(-50%);
  pointer-events: auto;
  scrollbar-width: thin;
}

.layer-panel .layer-project {
  flex: 0 0 min(15rem, 72vw);
  width: auto;
  min-height: 3.7rem;
  background: rgba(7, 23, 19, 0.92);
}

@media (max-width: 48rem) {
  .layer-panel {
    inset: calc(var(--topbar-height) + env(safe-area-inset-top)) 0 0;
    width: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .layer-panel > p {
    max-width: calc(100% - 3.5rem);
    font-size: 0.82rem;
  }

  .layer-panel .layer-buttons {
    bottom: max(6.4rem, calc(env(safe-area-inset-bottom) + 5.8rem));
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  .layer-stack-item {
    left: 4%;
    right: 4%;
    font-size: 0.64rem;
  }

  .layer-stack-item span {
    max-width: 14rem;
  }
}


.layer-stack-visual {
  display: none;
}

.layer-panel {
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.layer-panel-controls {
  position: absolute;
  z-index: 7;
  top: max(0.9rem, env(safe-area-inset-top));
  right: max(0.9rem, env(safe-area-inset-right));
  display: flex;
  gap: 0.55rem;
  pointer-events: auto;
}

.layer-panel-controls .icon-button {
  background: rgba(5, 16, 14, 0.84);
  backdrop-filter: blur(0.7rem);
}

.layer-discovery {
  position: absolute;
  z-index: 6;
  top: calc(max(0.9rem, env(safe-area-inset-top)) + 3.35rem);
  right: max(0.9rem, env(safe-area-inset-right));
  width: min(26rem, calc(100vw - 1.8rem));
  max-height: min(70vh, 34rem);
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 1rem;
  background: rgba(5, 16, 14, 0.94);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(1rem);
  pointer-events: auto;
}

.layer-discovery > label {
  display: block;
  margin-bottom: 0.55rem;
  font-weight: 720;
}

.layer-search-field {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 0.8rem;
}

.layer-search-field > span {
  position: absolute;
  left: 0.85rem;
  color: var(--muted);
  pointer-events: none;
}

.layer-search-field input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.8rem 0.65rem 2.35rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(7, 22, 18, 0.96);
  color: var(--text);
}

.layer-discovery .layer-buttons {
  display: grid;
  gap: 0.45rem;
}

.layer-discovery .layer-filter {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.7rem;
  text-align: left;
}

.layer-panel .layer-projects[hidden] {
  display: none;
}

/* Text ribbon sphere and swipeable close-up lanes. */
#sphere-rings {
  filter: drop-shadow(0 0 7px rgba(72, 183, 166, 0.2));
}

#sphere-rings use {
  fill: none;
  stroke: rgba(163, 213, 239, 0.26);
  stroke-width: 1.05;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  transition: opacity 240ms ease, stroke 240ms ease, stroke-width 240ms ease;
}

.sphere-ring-text {
  fill: rgba(225, 245, 251, 0.98);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--sphere-ring-font-size, 12px);
  letter-spacing: 0.025em;
  paint-order: stroke;
  stroke: rgba(2, 12, 10, 0.96);
  stroke-width: var(--sphere-ring-stroke-width, 1.7px);
  stroke-linejoin: round;
  transition: opacity 220ms ease;
}

.sphere-ring-plane[data-emphasis="primary"] use {
  opacity: 0.92;
  stroke-width: 1.25;
}

.sphere-ring-plane[data-emphasis="depth"] use {
  opacity: 0.34;
  stroke-width: 0.75;
}

.sphere-ring-plane[data-emphasis="depth"] .sphere-ring-text {
  opacity: 0.34;
}

.sphere-ring-plane[data-emphasis="depth"] .sphere-ring-name {
  display: none;
}

.sphere-bundle-child-ring {
  --bundle-ring-opacity: 0.58;
  animation: none;
  pointer-events: none;
}

.sphere-bundle-child-ring[data-bundle-index="1"] { --bundle-ring-opacity: 0.5; }
.sphere-bundle-child-ring[data-bundle-index="2"] { --bundle-ring-opacity: 0.42; }
.sphere-bundle-child-ring[data-bundle-index="3"] { --bundle-ring-opacity: 0.34; }

.sphere-ring-plane[data-emphasis="primary"] .sphere-bundle-child-ring {
  opacity: var(--bundle-ring-opacity);
  stroke-width: 0.9;
}

.sphere-ring-plane[data-emphasis="depth"] .sphere-bundle-child-ring {
  opacity: calc(var(--bundle-ring-opacity) * 0.42);
  stroke-width: 0.55;
}

.sphere-ring-label {
  font-weight: 820;
  letter-spacing: 0.055em;
}

.sphere-ring-name {
  font-weight: 720;
}

.sphere-ring-sublabel {
  font-size: 0.84em;
  font-weight: 650;
  letter-spacing: 0.035em;
  opacity: 0.82;
}

.sphere-ring-overflow {
  font-size: 0.82em;
  font-weight: 820;
  letter-spacing: 0.045em;
  opacity: 0.74;
}

.sphere-ring-overflow[data-hidden] {
  display: none;
}

.digital-sphere[data-ring-detail-level="compact"] .sphere-bundle-child-ring[data-bundle-index="2"],
.digital-sphere[data-ring-detail-level="compact"] .sphere-bundle-child-ring[data-bundle-index="3"],
.digital-sphere[data-ring-detail-level="compact"] .sphere-ring-sublabel[data-bundle-index="2"],
.digital-sphere[data-ring-detail-level="compact"] .sphere-ring-sublabel[data-bundle-index="3"],
.digital-sphere[data-ring-detail-level="close"] .sphere-bundle-child-ring[data-bundle-index="2"],
.digital-sphere[data-ring-detail-level="close"] .sphere-bundle-child-ring[data-bundle-index="3"],
.digital-sphere[data-ring-detail-level="close"] .sphere-ring-sublabel[data-bundle-index="2"],
.digital-sphere[data-ring-detail-level="close"] .sphere-ring-sublabel[data-bundle-index="3"],
.digital-sphere[data-ring-detail-level="micro"] .sphere-bundle-child-ring[data-bundle-index="1"],
.digital-sphere[data-ring-detail-level="micro"] .sphere-bundle-child-ring[data-bundle-index="2"],
.digital-sphere[data-ring-detail-level="micro"] .sphere-bundle-child-ring[data-bundle-index="3"],
.digital-sphere[data-ring-detail-level="micro"] .sphere-ring-sublabel[data-bundle-index="1"],
.digital-sphere[data-ring-detail-level="micro"] .sphere-ring-sublabel[data-bundle-index="2"],
.digital-sphere[data-ring-detail-level="micro"] .sphere-ring-sublabel[data-bundle-index="3"] {
  display: none;
}


.sphere-ring-text[data-layer-id="knowledge_data"] { fill: rgba(137, 205, 244, 0.96); }
.sphere-ring-text[data-layer-id="software_infrastructure"] { fill: rgba(126, 231, 174, 0.96); }
.sphere-ring-text[data-layer-id="media_culture"] { fill: rgba(242, 193, 127, 0.96); }
.sphere-ring-text[data-layer-id="learning_education"] { fill: rgba(215, 181, 243, 0.96); }
.sphere-ring-text[data-layer-id="communication_networks"] { fill: rgba(136, 231, 222, 0.96); }
.sphere-ring-text[data-layer-id="mixed_other"] { fill: rgba(229, 237, 233, 0.9); }
.sphere-ring-text[data-layer-id="knowledge_learning_culture"],
.sphere-ring-text[data-layer-id="open_knowledge_data"],
.sphere-ring-text[data-layer-id="learning_education"],
.sphere-ring-text[data-layer-id="media_culture"],
.sphere-ring-text[data-layer-id="knowledge_learning_bridge"] { fill: rgba(137, 205, 244, 0.96); }
.sphere-ring-text[data-layer-id="software_tools_production"],
.sphere-ring-text[data-layer-id="free_software"],
.sphere-ring-text[data-layer-id="open_hardware_production"],
.sphere-ring-text[data-layer-id="shared_platforms_tools"],
.sphere-ring-text[data-layer-id="knowledge_software_bridge"] { fill: rgba(126, 231, 174, 0.96); }
.sphere-ring-text[data-layer-id="community_networks"],
.sphere-ring-text[data-layer-id="federated_protocols"],
.sphere-ring-text[data-layer-id="network_coordination"] { fill: rgba(136, 231, 222, 0.96); }
.sphere-ring-text[data-layer-id="provision_land_ecology"],
.sphere-ring-text[data-layer-id="food_seed_agriculture"],
.sphere-ring-text[data-layer-id="water_irrigation"],
.sphere-ring-text[data-layer-id="renewable_energy"],
.sphere-ring-text[data-layer-id="health_software"],
.sphere-ring-text[data-layer-id="land_ecology"],
.sphere-ring-text[data-layer-id="food_distribution_platforms"],
.sphere-ring-text[data-layer-id="energy_cooperatives"],
.sphere-ring-text[data-layer-id="watershed_food_systems"] { fill: rgba(242, 193, 127, 0.96); }
.sphere-ring-text[data-layer-id="cooperation_self_organization"],
.sphere-ring-text[data-layer-id="cooperative_governance"],
.sphere-ring-text[data-layer-id="civic_technology"],
.sphere-ring-text[data-layer-id="mutual_local_self_help"] { fill: rgba(215, 181, 243, 0.96); }
.sphere-ring-text[data-empty] { opacity: 0.08; }

.digital-sphere {
  transition: opacity 160ms linear;
}

.globe-map {
  transform-origin: 50% 50%;
  transition: opacity 1080ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* During camera flights the sphere follows the MapLibre projection synchronously;
   geometry must not be re-animated by CSS on top of the map movement. */
.globe-stage[data-view-phase="entering-layers"] .digital-sphere,
.globe-stage[data-view-phase="settling-layers"] .digital-sphere,
.globe-stage[data-view-phase="preparing-overview"] .digital-sphere,
.globe-stage[data-view-phase="leaving-layers"] .digital-sphere {
  transition: opacity 360ms linear;
  will-change: opacity;
}

.globe-stage[data-view-phase="entering-layers"] .globe-map,
.globe-stage[data-view-phase="settling-layers"] .globe-map,
.globe-stage[data-view-phase="preparing-overview"] .globe-map {
  opacity: 0;
  transform: none;
  will-change: opacity;
}

.globe-stage[data-view-phase="layers"] .globe-map {
  opacity: 0;
  transform: none;
  pointer-events: none;
}

.globe-stage[data-view-phase="leaving-layers"] .globe-map {
  opacity: 1;
  transform: none;
  will-change: opacity;
}

.globe-stage[data-view-phase="entering-layers"] .digital-sphere {
  opacity: 1;
}

.globe-stage[data-view-phase="settling-layers"] .digital-sphere,
.globe-stage[data-view-phase="preparing-overview"] .digital-sphere {
  opacity: 0;
  pointer-events: none;
}

.globe-stage[data-view-phase="layers"] .digital-sphere {
  opacity: 0.06;
  pointer-events: none;
}

.globe-stage[data-view-phase="leaving-layers"] .digital-sphere {
  opacity: 1;
}

.globe-stage.layer-view-open .orientation-bar,
.globe-stage.layer-view-open .map-legend,
.globe-stage.layer-view-open .globe-results,
.globe-stage.layer-view-open .layer-view-button,
.globe-stage.layer-view-open .maplibregl-ctrl-container {
  opacity: 0;
  pointer-events: none;
}

.layer-panel {
  inset: calc(var(--topbar-height) + env(safe-area-inset-top)) 0 0;
  width: 100%;
  max-height: none;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 8% 54%, rgba(62, 137, 166, 0.16), transparent 38%),
    linear-gradient(90deg, rgba(4, 14, 12, 0.98), rgba(6, 20, 17, 0.93) 22%, rgba(5, 17, 15, 0.97));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 340ms ease, visibility 0s linear 340ms;
}

.layer-panel[data-visible] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.layer-panel[data-closing] {
  opacity: 0;
  pointer-events: none;
}

.layer-panel-controls {
  position: absolute;
  z-index: 20;
  top: max(0.85rem, env(safe-area-inset-top));
  right: max(0.9rem, env(safe-area-inset-right));
  display: flex;
  gap: 0.55rem;
  pointer-events: auto;
}

.layer-panel-controls .icon-button {
  background: rgba(5, 16, 14, 0.9);
  backdrop-filter: blur(0.8rem);
}

.digital-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.28rem;
  color: rgba(225, 239, 232, 0.84);
  font-size: 0.82rem;
  line-height: 1.2;
}

.digital-breadcrumb-item {
  min-height: var(--minimum-touch-target);
  min-width: var(--minimum-touch-target);
  max-width: 100%;
  padding: 0.48rem 0.68rem;
  border: 1px solid rgba(237, 244, 239, 0.18);
  border-radius: 0.65rem;
  background: rgba(5, 16, 14, 0.82);
  color: rgba(237, 244, 239, 0.9);
  overflow-wrap: anywhere;
  text-align: left;
}

.digital-breadcrumb-item[aria-current="page"] {
  border-color: color-mix(in srgb, var(--focus) 55%, transparent);
  color: var(--focus);
}

.digital-current {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 680;
}

.layer-panel > .digital-breadcrumb {
  position: absolute;
  z-index: 18;
  top: max(0.85rem, env(safe-area-inset-top));
  left: max(0.9rem, env(safe-area-inset-left));
  right: max(7.2rem, calc(env(safe-area-inset-right) + 7.2rem));
  pointer-events: auto;
}

.layer-panel > .digital-current {
  position: absolute;
  z-index: 18;
  top: calc(max(0.85rem, env(safe-area-inset-top)) + 3.05rem);
  left: max(1.05rem, env(safe-area-inset-left));
  right: max(7.2rem, calc(env(safe-area-inset-right) + 7.2rem));
  pointer-events: none;
}

.layer-track-deck {
  position: absolute;
  z-index: 5;
  inset: max(7.2rem, calc(env(safe-area-inset-top) + 6.7rem)) 0 max(0.8rem, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: repeat(var(--lane-count, 5), minmax(0, 1fr));
  align-content: stretch;
  gap: clamp(0.3rem, 0.8vh, 0.7rem);
  padding: 0 max(0.8rem, env(safe-area-inset-right)) 0 max(0.8rem, env(safe-area-inset-left));
  opacity: 0;
  transform: translateX(16vw);
  transform-origin: 100% 50%;
  pointer-events: auto;
  transition: opacity 420ms ease, transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

.layer-panel[data-visible] .layer-track-deck {
  opacity: 1;
  transform: translateX(0);
}

.digital-lane {
  --lane-color: rgba(226, 235, 231, 0.88);
  display: grid;
  grid-template-columns: clamp(12.5rem, 19vw, 17rem) minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(160, 205, 188, 0.17);
  border-radius: 0.85rem;
  background: linear-gradient(90deg, rgba(8, 28, 23, 0.98), rgba(7, 23, 20, 0.68) 31%, rgba(5, 18, 15, 0.84));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: opacity 220ms ease, transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.digital-lane[data-layer-id="knowledge_data"] { --lane-color: rgba(137, 205, 244, 0.96); }
.digital-lane[data-layer-id="software_infrastructure"] { --lane-color: rgba(126, 231, 174, 0.96); }
.digital-lane[data-layer-id="media_culture"] { --lane-color: rgba(242, 193, 127, 0.96); }
.digital-lane[data-layer-id="learning_education"] { --lane-color: rgba(215, 181, 243, 0.96); }
.digital-lane[data-layer-id="communication_networks"] { --lane-color: rgba(136, 231, 222, 0.96); }
.digital-lane[data-layer-id="knowledge_learning_culture"],
.digital-lane[data-layer-id="open_knowledge_data"],
.digital-lane[data-layer-id="knowledge_learning_bridge"] { --lane-color: rgba(137, 205, 244, 0.96); }
.digital-lane[data-layer-id="software_tools_production"],
.digital-lane[data-layer-id="free_software"],
.digital-lane[data-layer-id="open_hardware_production"],
.digital-lane[data-layer-id="shared_platforms_tools"],
.digital-lane[data-layer-id="knowledge_software_bridge"] { --lane-color: rgba(126, 231, 174, 0.96); }
.digital-lane[data-layer-id="community_networks"],
.digital-lane[data-layer-id="federated_protocols"],
.digital-lane[data-layer-id="network_coordination"] { --lane-color: rgba(136, 231, 222, 0.96); }
.digital-lane[data-layer-id="provision_land_ecology"],
.digital-lane[data-layer-id="food_seed_agriculture"],
.digital-lane[data-layer-id="water_irrigation"],
.digital-lane[data-layer-id="renewable_energy"],
.digital-lane[data-layer-id="health_software"],
.digital-lane[data-layer-id="land_ecology"],
.digital-lane[data-layer-id="food_distribution_platforms"],
.digital-lane[data-layer-id="energy_cooperatives"],
.digital-lane[data-layer-id="watershed_food_systems"] { --lane-color: rgba(242, 193, 127, 0.96); }
.digital-lane[data-layer-id="cooperation_self_organization"],
.digital-lane[data-layer-id="cooperative_governance"],
.digital-lane[data-layer-id="civic_technology"],
.digital-lane[data-layer-id="mutual_local_self_help"] { --lane-color: rgba(215, 181, 243, 0.96); }

.digital-lane-focus {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 0.28rem;
  min-width: 0;
  min-height: 46px;
  padding: 0.6rem 0.9rem;
  border: 0;
  border-right: 1px solid color-mix(in srgb, var(--lane-color) 20%, transparent);
  border-radius: 0.8rem 0 0 0.8rem;
  background: rgba(5, 18, 15, 0.94);
  color: var(--lane-color);
  text-align: left;
  cursor: pointer;
}

.digital-lane-focus.is-label {
  cursor: default;
  user-select: text;
}

.digital-lane-focus span {
  font-size: clamp(0.8rem, 1.05vw, 0.98rem);
  font-weight: 720;
  line-height: 1.25;
  letter-spacing: 0.018em;
  overflow-wrap: normal;
  white-space: normal;
  word-break: normal;
  hyphens: manual;
  text-wrap: balance;
}

.digital-lane-focus small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 540;
}

.digital-lane-focus[aria-pressed="true"] {
  background: color-mix(in srgb, var(--lane-color) 13%, rgba(5, 18, 15, 0.96));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lane-color) 46%, transparent);
}

.digital-lane-scroll {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-color: color-mix(in srgb, var(--lane-color) 44%, transparent) transparent;
  scrollbar-width: thin;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}

.digital-lane-scroll[data-overflowing][data-at-start]:not([data-at-end]) {
  -webkit-mask-image: linear-gradient(90deg, black 0, black calc(100% - 1.5rem), transparent 100%);
  mask-image: linear-gradient(90deg, black 0, black calc(100% - 1.5rem), transparent 100%);
}

.digital-lane-scroll[data-overflowing][data-at-end]:not([data-at-start]) {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 1.1rem, black 100%);
  mask-image: linear-gradient(90deg, transparent 0, black 1.1rem, black 100%);
}

.digital-lane-scroll[data-overflowing]:not([data-at-start]):not([data-at-end]) {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 1.1rem, black calc(100% - 1.5rem), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, black 1.1rem, black calc(100% - 1.5rem), transparent 100%);
}

html:not([data-input-modality="pointer"]) .digital-lane-scroll:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -3px;
}

.digital-lane-content {
  display: flex;
  align-items: center;
  width: max-content;
  min-width: 100%;
  min-height: 100%;
  gap: clamp(1.5rem, 3vw, 3rem);
  padding: 0.45rem clamp(1.8rem, 3.5vw, 3.6rem);
}

.digital-ribbon-item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  min-height: 46px;
  padding: 0.45rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--lane-color);
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  scroll-snap-align: start;
}

.digital-ribbon-item::after {
  content: "·";
  margin-left: clamp(0.8rem, 1.5vw, 1.5rem);
  color: color-mix(in srgb, var(--lane-color) 42%, transparent);
  font-size: 1rem;
  transform: translateY(-0.02rem);
}

.digital-ribbon-item:last-child::after {
  display: none;
}

.digital-ribbon-item:hover .digital-ribbon-name,
.digital-ribbon-item.is-selected .digital-ribbon-name,
html:not([data-input-modality="pointer"]) .digital-ribbon-item:focus-visible .digital-ribbon-name {
  color: var(--focus);
}

html:not([data-input-modality="pointer"]) .digital-ribbon-item:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 0.25rem;
}

.digital-ribbon-name {
  font-size: clamp(0.96rem, 1.55vw, 1.32rem);
  font-weight: 720;
  letter-spacing: 0.015em;
}


.digital-lane[data-empty] {
  opacity: 0.28;
}

.digital-lane[data-empty] .digital-lane-scroll::after {
  content: "Keine Treffer";
  position: absolute;
  left: 2rem;
  top: 50%;
  color: var(--muted);
  font-size: 0.8rem;
  transform: translateY(-50%);
}

.globe-stage[data-focused-path] .layer-panel {
  --focused-lane-top: max(7.2rem, calc(env(safe-area-inset-top) + 6.7rem));
  --focused-lane-height: clamp(8.25rem, 20vh, 10.75rem);
}

.globe-stage[data-focused-path] .layer-track-deck {
  inset: var(--focused-lane-top) 0 auto;
  height: var(--focused-lane-height);
  grid-template-rows: minmax(0, 1fr);
  align-content: stretch;
  padding-block: 0;
}

.globe-stage[data-focused-path] .digital-lane[data-layer-hidden] {
  display: none;
}

.globe-stage[data-focused-path] .digital-lane.is-focused {
  grid-template-columns: clamp(13.5rem, 20vw, 18rem) minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  border-color: color-mix(in srgb, var(--lane-color) 38%, transparent);
  background: linear-gradient(90deg, rgba(8, 28, 23, 0.98), rgba(7, 24, 20, 0.72) 28%, rgba(5, 18, 15, 0.9));
}

.globe-stage[data-focused-path] .digital-lane-focus span {
  font-size: clamp(0.9rem, 1.5vw, 1.2rem);
}

.globe-stage[data-focused-path] .digital-ribbon-name {
  font-size: clamp(1.08rem, 2vw, 1.7rem);
}

.digital-lane-content .identity-show-more {
  flex: 0 0 auto;
  min-height: 44px;
  margin: 0;
  white-space: nowrap;
}

.layer-discovery {
  z-index: 30;
}

.layer-panel .layer-projects[hidden] {
  display: none;
}

@media (max-width: 48rem) {
  .layer-track-deck {
    top: max(7.1rem, calc(env(safe-area-inset-top) + 6.55rem));
    gap: 0.3rem;
    padding-inline: 0.45rem;
  }

  .digital-lane {
    grid-template-columns: clamp(8.25rem, 34vw, 10rem) minmax(0, 1fr);
    border-radius: 0.65rem;
  }

  .digital-lane-focus {
    padding-inline: 0.55rem;
  }

  .digital-lane-focus small {
    font-size: 0.61rem;
  }

  .digital-lane-content {
    gap: 1.25rem;
    padding-inline: 1.2rem;
  }

  .digital-ribbon-item {
    padding-block: 0.4rem;
  }

  .digital-ribbon-name {
    font-size: clamp(0.84rem, 3vw, 1.1rem);
  }


  .globe-stage[data-focused-path] .layer-panel {
    --focused-lane-height: clamp(7.25rem, 18vh, 9rem);
  }

  .globe-stage[data-focused-path] .digital-lane.is-focused {
    grid-template-columns: clamp(8.75rem, 36vw, 10.5rem) minmax(0, 1fr);
    min-height: 0;
  }

}

@media (orientation: landscape) and (max-height: 30rem) {
  .layer-view-button {
    right: calc(max(0.55rem, env(safe-area-inset-right)) + 3.4rem);
  }

  .layer-track-deck {
    grid-template-rows: repeat(var(--lane-count, 5), minmax(48px, auto));
    align-content: start;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
    padding-bottom: max(0.8rem, env(safe-area-inset-bottom));
  }

  .digital-lane {
    min-height: 48px;
  }

  .globe-stage[data-focused-path] .layer-panel {
    --focused-lane-top: max(6.7rem, calc(env(safe-area-inset-top) + 6.2rem));
    --focused-lane-height: 5.5rem;
  }

  .globe-stage[data-focused-path] .layer-track-deck {
    grid-template-rows: minmax(48px, 1fr);
    overflow-y: visible;
    padding-bottom: 0;
  }

}

@media (orientation: landscape) and (max-height: 24rem) {
  .globe-stage[data-focused-path] .layer-panel {
    --focused-lane-top: max(4.8rem, calc(env(safe-area-inset-top) + 4.45rem));
    --focused-lane-height: 4.25rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
}

/* Intent-oriented discovery surface */
.discovery-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-width: 0;
}

.discovery-control .search-control {
  width: 100%;
}

.filter-toggle.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 2.75rem;
  aspect-ratio: auto;
  gap: 0.4rem;
  padding: 0 0.8rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 720;
}

.filter-toggle-icon {
  display: block;
  width: 1.2rem;
  height: 1rem;
  flex: 0 0 auto;
  background:
    linear-gradient(currentColor 0 0) 0 0 / 100% 2px no-repeat,
    linear-gradient(currentColor 0 0) 0 50% / 72% 2px no-repeat,
    linear-gradient(currentColor 0 0) 0 100% / 44% 2px no-repeat;
}

.filter-toggle[aria-expanded="true"] {
  border-color: var(--green);
  color: var(--green);
}

.discovery-panel {
  position: fixed;
  z-index: 48;
  top: calc(var(--topbar-height) + env(safe-area-inset-top) + 0.55rem);
  left: 50%;
  width: min(66rem, calc(100% - 2rem));
  max-height: calc(100dvh - var(--topbar-height) - env(safe-area-inset-top) - 1.5rem);
  overflow: auto;
  padding: 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 1rem;
  background: rgba(7, 20, 17, 0.97);
  box-shadow: 0 1.2rem 4rem rgba(0, 0, 0, 0.46);
  transform: translateX(-50%);
  backdrop-filter: blur(1rem);
  overscroll-behavior: contain;
}

.discovery-heading,
.discovery-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.discovery-heading h2,
.discovery-heading p,
.discovery-summary-row p {
  margin: 0;
}

.filter-presence-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}
.filter-presence-options > label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: var(--minimum-touch-target, 44px);
  padding: 0 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.75rem;
  background: #0b201b;
  color: #edf4ef;
  font-size: 0.8rem;
  font-weight: 650;
  white-space: nowrap;
}
.filter-presence-options input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  min-width: 1.05rem;
  margin: 0;
}
.filter-presence-note {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.filter-toggle-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--green);
  color: #06140f;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
}

.active-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

.active-filter-chips:empty {
  margin-top: 0;
}

.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: var(--minimum-touch-target, 44px);
  padding: 0.25rem 0.4rem 0.25rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(103, 210, 154, 0.1);
  color: #edf4ef;
  font-size: 0.78rem;
  font-weight: 650;
}

.active-filter-chip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--minimum-touch-target, 44px);
  height: var(--minimum-touch-target, 44px);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.filter-sections-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

.filter-sections-toggle[aria-expanded="false"] {
  color: var(--muted);
}

.filter-sections-toggle[aria-expanded="false"] .filter-toggle-icon {
  opacity: 0.6;
}

.filter-sections[hidden] {
  display: none;
}

.filter-sections {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.7rem;
}

.filter-group {
  margin: 0;
  padding: 0;
  border: 0;
}

.filter-group > legend {
  margin: 0 0 0.4rem;
  padding: 0;
  color: #edf4ef;
  font-size: 0.86rem;
  font-weight: 780;
}

.filter-group-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.filter-commons-type,
.filter-action {
  grid-column: span 2;
}

.spatial-destination-search {
  position: relative;
  z-index: 8;
  grid-column: span 2;
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.spatial-destination-search input {
  min-height: 2.75rem;
  padding: 0.5rem 0.72rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.75rem;
  background: #0b201b;
  color: #edf4ef;
  font: inherit;
}

.spatial-destination-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0.35rem;
  max-height: min(18rem, 50vh);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 0.85rem;
  background: rgba(6, 18, 15, 0.98);
  box-shadow: 0 0.8rem 2.5rem rgba(0, 0, 0, 0.42);
  list-style: none;
}

.spatial-destination-results:empty {
  display: none;
}

.spatial-destination-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem;
  border-radius: 0.65rem;
}

.spatial-destination-result + .spatial-destination-result {
  border-top: 1px solid var(--line);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.spatial-destination-result-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.spatial-destination-result-copy strong {
  overflow: hidden;
  color: #edf4ef;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spatial-destination-result-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spatial-destination-result-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.spatial-destination-result-actions .quiet-button {
  min-height: var(--minimum-touch-target, 44px);
  padding: 0.3rem 0.58rem;
  font-size: 0.72rem;
  line-height: 1.15;
  white-space: nowrap;
}

.spatial-search-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.geolocation-status {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.geolocation-status:empty {
  display: none;
}

.filter-group-controls label,
.location-filter-block--destination label {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.filter-group-controls select,
.location-filter-block--destination select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 2rem 0.5rem 0.72rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.75rem;
  background: #0b201b;
  color: #edf4ef;
  font: inherit;
}

.filter-group-controls > .filter-presence-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.filter-group-controls > .filter-presence-group > legend {
  margin: 0 0 0.25rem;
  padding: 0;
  color: inherit;
  font: inherit;
}

.filter-group-controls #use-current-location {
  justify-self: start;
  width: max-content;
  max-width: 100%;
  min-height: var(--minimum-touch-target, 44px);
  padding: 0.35rem 0.75rem;
  font-size: 0.76rem;
  line-height: 1.2;
  white-space: nowrap;
}

.country-navigation-context {
  position: absolute;
  z-index: 19;
  top: calc(var(--topbar-height) + env(safe-area-inset-top) + 4rem);
  right: max(0.85rem, env(safe-area-inset-right));
  display: grid;
  gap: 0.5rem;
  width: min(18rem, calc(100% - 1.7rem));
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.85rem;
  background: rgba(6, 18, 15, 0.92);
  color: #edf4ef;
  font-size: 0.82rem;
  backdrop-filter: blur(0.75rem);
}

.country-navigation-name {
  margin: 0;
  padding-right: 1.5rem;
  font-weight: 720;
}

.country-navigation-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.discovery-summary-row {
  display: grid;
  grid-template-columns: minmax(12rem, auto) minmax(14rem, 1fr) auto auto;
  align-items: end;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.discovery-sort {
  display: grid;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.discovery-sort select {
  min-height: 2.75rem;
  padding: 0.45rem 2.1rem 0.45rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.75rem;
  background: #0b201b;
  color: #edf4ef;
  font: inherit;
}

.discovery-sort-note {
  max-width: 32rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.discovery-count {
  color: var(--muted);
  font-size: 0.86rem;
}

.quiet-button {
  min-height: 2.75rem;
  padding: 0.48rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(7, 22, 18, 0.92);
  color: inherit;
  cursor: pointer;
}

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

.discovery-empty {
  margin: 1rem 0 0;
  padding: 1rem;
  border: 1px solid rgba(224, 173, 105, 0.55);
  border-radius: 0.85rem;
  color: #ffe1a8;
}

.discovery-list {
  display: grid;
  gap: 0.45rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

.result-continuation,
.identity-show-more {
  min-height: 44px;
  margin-top: 0.85rem;
}

.identity-presentation-status {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.discovery-result {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(10, 31, 26, 0.72);
}

.discovery-result.is-selected {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(103, 210, 154, 0.25);
}

.discovery-result-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  width: 100%;
  min-height: 3.75rem;
  padding: 0.65rem 0.75rem;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.discovery-result-main:hover {
  background: rgba(103, 210, 154, 0.07);
}

.discovery-result-rank {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.discovery-result-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.discovery-result-copy strong {
  font-size: 1rem;
}

.discovery-result-meta {
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 700;
}

.discovery-result-summary {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.discovery-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 0.75rem 0.65rem 3.15rem;
}

.discovery-result-actions a,
.catalog-action-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.42rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: #c2ecd4;
  font-size: 0.78rem;
  text-decoration: none;
}

.discovery-result-actions a:hover,
.catalog-action-link:hover {
  border-color: var(--green);
  color: #edf4ef;
}

.text-discovery-open {
  width: 100%;
  margin-bottom: 0.7rem;
}

@media (max-width: 48rem) {
  .discovery-summary-row {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .discovery-sort,
  .discovery-sort-note {
    grid-column: 1 / -1;
  }

  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 0.5rem;
  }

  .discovery-control {
    gap: 0.35rem;
  }

  .filter-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .filter-toggle.icon-button {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    padding: 0;
    border-radius: 50%;
  }

  /* Bound visual motion on narrow layouts without splitting a ring plane. */
  .sphere-ring-plane[data-emphasis="depth"] {
    animation: none;
    transform: rotate(var(--ring-orbit-start-angle, 0deg));
  }

  .sphere-ring-text {
    font-size: var(--sphere-ring-font-size, 22px);
    stroke-width: var(--sphere-ring-stroke-width, 2.4px);
    letter-spacing: 0.018em;
  }


  .discovery-panel {
    top: calc(var(--topbar-height) + env(safe-area-inset-top));
    width: 100%;
    max-height: calc(100dvh - var(--topbar-height) - env(safe-area-inset-top));
    padding: 0.85rem max(0.85rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(0.85rem, env(safe-area-inset-left));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
    transform: translateX(-50%);
  }

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

  .filter-commons-type,
  .filter-action,
  .spatial-destination-search {
    grid-column: 1 / -1;
  }

  .country-navigation-context {
    width: min(15rem, calc(100% - 1.7rem));
  }
}

@media (hover: none) and (pointer: coarse) {
  /* Preserve readable ring type on touch-first landscape and tablet viewports. */
  .sphere-ring-text {
    font-size: var(--sphere-ring-font-size, 22px);
    stroke-width: var(--sphere-ring-stroke-width, 2.4px);
    letter-spacing: 0.018em;
  }
}

@media (max-width: 30rem) {
  .brand > span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .filter-group-controls {
    grid-template-columns: 1fr;
  }

  .filter-commons-type,
  .filter-action,
  .spatial-destination-search {
    grid-column: auto;
  }

  .filter-group-controls #use-current-location {
    justify-self: stretch;
    width: 100%;
  }

  .discovery-result-actions {
    padding-left: 0.85rem;
  }

  .country-navigation-context {
    top: auto;
    right: max(0.6rem, env(safe-area-inset-right));
    bottom: max(0.9rem, env(safe-area-inset-bottom));
    width: min(16rem, calc(100% - 1.2rem));
  }
}


/* Filter layout semantics v1 */
.discovery-panel {
  width: min(56rem, calc(100% - 2rem));
  padding: 0;
}

.discovery-heading {
  position: sticky;
  z-index: 24;
  top: 0;
  min-height: 3.65rem;
  padding: 0.72rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 20, 17, 0.98);
  backdrop-filter: blur(1rem);
}

.discovery-heading .kicker {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.discovery-heading h2 {
  font-size: clamp(1.12rem, 2.4vw, 1.42rem);
  line-height: 1.15;
}

.active-filter-chips {
  padding: 0 0.85rem;
}

.filter-sections {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0;
  padding: 0.75rem 0.85rem;
}

.filter-group {
  min-width: 0;
  padding: 0.72rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(11, 32, 27, 0.62);
}

.filter-group--location,
.advanced-filters {
  grid-column: 1 / -1;
}

.filter-group > legend {
  padding: 0 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.filter-group-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.filter-commons-type,
.filter-action,
.spatial-destination-search {
  grid-column: auto;
}

.location-filter-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 0.8fr) minmax(0, 1.2fr);
  gap: 0.65rem;
}

.location-filter-block {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 0.78rem;
  background: rgba(5, 18, 14, 0.38);
}

.location-filter-block > h3 {
  margin: 0;
  color: #edf4ef;
  font-size: 0.78rem;
  line-height: 1.2;
}

.location-filter-block.filter-presence-group {
  align-self: start;
  min-width: 0;
  margin: 0;
}

.location-filter-block.filter-presence-group > legend {
  padding: 0 0.25rem;
  color: #edf4ef;
  font-size: 0.78rem;
  font-weight: 740;
}

.location-filter-block--destination {
  grid-template-columns: minmax(0, 1fr) minmax(9rem, 0.55fr);
  align-items: end;
}

.location-filter-block--destination > h3,
.location-filter-block--destination > .spatial-search-note,
.location-filter-block--destination > .geolocation-status,
.location-filter-block--destination > .location-proximity-controls {
  grid-column: 1 / -1;
}

.location-proximity-controls {
  display: grid;
  grid-template-columns: minmax(8rem, 0.7fr) auto;
  align-items: end;
  gap: 0.5rem;
}

.location-proximity-controls > label {
  min-width: 0;
}

.location-proximity-controls #use-current-location {
  width: max-content;
  max-width: 100%;
  padding: 0.35rem 0.75rem;
  font-size: 0.76rem;
  line-height: 1.2;
  white-space: nowrap;
}

.advanced-filters {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(11, 32, 27, 0.46);
}

.advanced-filters > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--minimum-touch-target, 44px);
  padding: 0.65rem 0.75rem;
  color: #edf4ef;
  font-size: 0.8rem;
  font-weight: 760;
  cursor: pointer;
  list-style: none;
}

.advanced-filters > summary::-webkit-details-marker {
  display: none;
}

.advanced-filters > summary::after {
  content: '+';
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
}

.advanced-filters[open] > summary::after {
  content: '−';
}

.advanced-filters > .filter-group-controls {
  padding: 0 0.75rem 0.75rem;
}

.discovery-summary-row {
  grid-template-columns: minmax(10.5rem, 0.8fr) minmax(12rem, 1.35fr) auto;
  gap: 0.55rem 0.7rem;
  margin-top: 0;
  padding: 0.72rem 0.85rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 18, 14, 0.42);
}

.discovery-summary-row #filter-clear {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
}

.discovery-count {
  grid-column: 1;
  font-weight: 700;
}

.discovery-sort-note {
  max-width: none;
}

.discovery-list,
.discovery-empty,
.result-continuation {
  margin-right: 0.85rem;
  margin-left: 0.85rem;
}

.filter-group-controls select,
.location-filter-block--destination select,
.spatial-destination-search input,
.discovery-sort select,
.location-filter-block .quiet-button,
.advanced-filters > summary {
  min-height: var(--minimum-touch-target, 44px);
}

@media (max-width: 48rem) {
  .discovery-panel {
    width: min(42rem, calc(100% - 1rem));
  }

  .filter-sections,
  .location-filter-layout,
  .location-filter-block--destination,
  .discovery-summary-row {
    grid-template-columns: 1fr;
  }

  .filter-group--location,
  .advanced-filters,
  .location-filter-block--destination > h3,
  .location-filter-block--destination > .spatial-search-note,
  .location-filter-block--destination > .geolocation-status,
  .location-filter-block--destination > .location-proximity-controls,
  .discovery-summary-row #filter-clear,
  .discovery-count {
    grid-column: 1;
  }

  .discovery-summary-row #filter-clear {
    grid-row: auto;
    justify-self: stretch;
  }
}

@media (max-width: 34rem) {
  .discovery-panel {
    top: calc(var(--topbar-height) + env(safe-area-inset-top));
    width: 100%;
    max-height: calc(100dvh - var(--topbar-height) - env(safe-area-inset-top));
    border-right: 0;
    border-left: 0;
    border-radius: 0 0 1rem 1rem;
  }

  .filter-group-controls,
  .location-proximity-controls,
  .advanced-filters > .filter-group-controls {
    grid-template-columns: 1fr;
  }
}

/* Accessibility modes contract: T016 */
@media (prefers-contrast: more) {
  :root {
    --muted: #d8e3dd;
    --line: rgba(237, 244, 239, 0.46);
    --line-strong: rgba(237, 244, 239, 0.8);
    --focus: #fff8cf;
  }

  :focus-visible {
    outline: 4px solid var(--focus);
    outline-offset: 0.22rem;
  }

  .icon-button,
  .quiet-button,
  .layer-view-button,
  .layer-filter,
  .layer-project,
  .catalog-select,
  .presentation-choices button,
  .search-control,
  .filter-group-controls select,
  .filter-presence-options label,
  .discovery-result,
  .catalog-card,
  .catalog-action-link,
  .discovery-result-actions a {
    border-width: 2px;
  }

  input:checked,
  .discovery-result.is-selected,
  .digital-ribbon-item.is-selected,
  .digital-lane-focus[aria-pressed="true"],
  .layer-filter[aria-pressed="true"],
  .layer-project[aria-pressed="true"],
  .catalog-select[aria-pressed="true"],
  .presentation-choices button[aria-checked="true"] {
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }
}

@media (forced-colors: active) {
  :root {
    color-scheme: light dark;
    --muted: CanvasText;
    --line: CanvasText;
    --line-strong: CanvasText;
    --surface: Canvas;
    --surface-solid: Canvas;
    --green: LinkText;
    --blue: LinkText;
    --focus: Highlight;
  }

  body,
  .app-shell,
  .globe-surface,
  .globe-stage,
  .text-view,
  .method-page {
    background: Canvas;
    color: CanvasText;
  }

  a,
  .catalog-action-link,
  .discovery-result-actions a {
    color: LinkText;
  }

  :focus-visible,
  .sphere-edge-control:focus-visible,
  .maplibregl-ctrl-group button:focus-visible {
    outline: 3px solid Highlight !important;
    outline-offset: 3px;
    box-shadow: none !important;
  }

  button,
  input,
  select,
  .icon-button,
  .quiet-button,
  .layer-view-button,
  .layer-filter,
  .layer-project,
  .catalog-select,
  .presentation-choices button,
  .filter-presence-options label,
  .catalog-action-link,
  .discovery-result-actions a,
  .maplibregl-ctrl-group button {
    border: 2px solid ButtonText;
    background: ButtonFace;
    color: ButtonText;
    box-shadow: none;
  }

  input,
  select,
  .search-control {
    border: 2px solid FieldText;
    background: Field;
    color: FieldText;
  }

  .topbar,
  .discovery-panel,
  .settings-panel,
  .project-focus,
  .layer-panel,
  .layer-discovery,
  .digital-lane,
  .discovery-result,
  .catalog-card,
  .orientation-bar,
  .map-status,
  .globe-results {
    border-color: CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
  }

  input:checked,
  [aria-expanded="true"],
  [aria-pressed="true"],
  [aria-checked="true"],
  .discovery-result.is-selected,
  .digital-ribbon-item.is-selected,
  .digital-lane.is-focused {
    outline: 3px solid Highlight;
    outline-offset: 2px;
  }

  [disabled],
  [aria-disabled="true"] {
    border-color: GrayText;
    color: GrayText;
  }

  .sphere-edge-control {
    stroke: ButtonText;
  }

  .sphere-edge-focus {
    stroke: Highlight;
  }

  #sphere-rings text,
  .digital-ribbon-name,
  .discovery-result-summary,
  .semantic-summary {
    fill: CanvasText;
    color: CanvasText;
  }
}

@media (max-width: 760px) {
  .map-legend {
    top: calc(var(--topbar-height) + env(safe-area-inset-top) + 4.2rem);
    right: max(0.85rem, env(safe-area-inset-right));
    left: auto;
    bottom: auto;
    width: min(18rem, calc(100% - 1.7rem));
  }

  .map-legend[open] {
    width: calc(100% - 1.7rem);
  }

  .legend-list {
    grid-template-columns: 1fr;
  }
}

/* Locale candidates and bidirectional layout */
body[data-locale-candidate][data-presentation] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
}

body[data-locale-candidate][data-presentation] .app-shell {
  position: relative;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

body[data-locale-candidate][data-presentation] .topbar {
  position: absolute;
}

body[data-locale-candidate][data-presentation] .globe-surface,
body[data-locale-candidate][data-presentation] .globe-stage {
  min-height: 0;
  height: 100%;
}

body[data-locale-candidate][data-presentation] .text-view {
  min-height: 0;
  max-height: 100%;
  overflow: auto;
}

.locale-candidate-banner {
  position: relative;
  z-index: 60;
  margin: 0;
  padding: 0.65rem max(1rem, env(safe-area-inset-right)) 0.65rem max(1rem, env(safe-area-inset-left));
  border-block-end: 1px solid var(--line);
  background: var(--surface-solid);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: start;
}

#focus-links a[data-content-language],
#focus-sources a[data-content-language] {
  unicode-bidi: isolate;
}

html[dir="rtl"] body {
  direction: rtl;
  text-align: start;
}

html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="number"],
html[dir="rtl"] [dir="ltr"],
html[dir="rtl"] code,
html[dir="rtl"] .catalog-action-link,
html[dir="rtl"] .catalog-actions a {
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: start;
}

html[dir="rtl"] input[type="text"],
html[dir="rtl"] input[type="search"],
html[dir="rtl"] textarea {
  direction: rtl;
  unicode-bidi: plaintext;
  text-align: start;
}

html[dir="rtl"] .language-switch,
html[dir="rtl"] .catalog-actions,
html[dir="rtl"] .proposal-controls {
  flex-direction: row-reverse;
}

html[dir="rtl"] .secondary-back-link {
  unicode-bidi: plaintext;
}
