.gss {
  --ink: #25372e;
  --muted: #58665d;
  --line: #dbe2d8;
  --surface: #fffefa;
  --green: #315f4e;
  grid-column: 1 / -1;
  min-width: 0;
  padding: clamp(14px, 2.7vw, 28px);
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
}

.gss *, .gss *::before, .gss *::after { box-sizing: border-box; }
.gss [hidden] { display: none !important; }
.gss h2, .gss h3, .gss h4, .gss h5, .gss p { margin: 0; }
.gss h2 { font-size: clamp(1.28rem, 2.3vw, 1.85rem); line-height: 1.18; letter-spacing: -.025em; }
.gss h3 { font-size: 1rem; line-height: 1.22; }
.gss h4 { font-size: .82rem; line-height: 1.25; }
.gss p { font-size: .87rem; line-height: 1.45; }
.gss .gss-heading p { margin-top: 7px; color: var(--muted); }
.gss .gss-heading p:first-of-type { max-width: 78ch; color: var(--ink); }
.gss button, .gss input { font: inherit; color: inherit; }
.gss button { cursor: pointer; }
.gss button:disabled { cursor: default; opacity: .43; }
.gss a { color: var(--green); text-underline-offset: 3px; }
.gss button:focus-visible, .gss input:focus-visible, .gss a:focus-visible,
.gss summary:focus-visible, .gss .gss-map:focus-visible { outline: 3px solid #b47a35; outline-offset: 2px; }
.gss .gss-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.gss .gss-regions, .gss [data-gss-regions] { display: flex; flex-wrap: wrap; gap: 5px 6px; }
.gss .gss-toolbar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-top: 15px; }
.gss .gss-levels { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border: 1px solid #d6e0d4; border-radius: 8px; background: #f5f8f2; }
.gss .gss-levels button { min-height: 34px; border: 1px solid transparent; border-radius: 5px; padding: 6px 10px; background: transparent; font-size: .83rem; }
.gss .gss-levels button:hover { background: #eaf0e7; }
.gss .gss-levels button[aria-pressed="true"] { background: #315f4e; color: white; font-weight: 650; }
.gss .gss-overlay-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: .81rem; cursor: pointer; }
.gss .gss-overlay-toggle input { accent-color: #315f4e; width: 16px; height: 16px; }
.gss .gss-regions { margin: 9px 0 10px; }
.gss .gss-regions button {
  min-height: 36px;
  border: 1px solid #d2ded2;
  padding: 6px 10px;
  border-radius: 6px;
  background: #f8faf5;
  font-size: .8rem;
}
.gss .gss-regions button:not(:disabled):hover, .gss .gss-regions button[aria-pressed="true"] { background: #e8efe6; border-color: #a9c0b0; }
.gss .gss-ladoga-controls { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.gss .gss-ladoga-controls button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #d2ded2; border-radius: 6px; background: #f8faf5; min-height: 36px; padding: 5px 9px; font-size: .78rem; text-align: left; }
.gss .gss-ladoga-controls button:hover, .gss .gss-ladoga-controls button[aria-pressed="true"] { background: #e5eee3; border-color: #adc3ae; }
.gss .gss-ladoga-controls i { flex: none; width: 9px; height: 9px; border-radius: 2px; background: var(--shape-color); }

.gss .gss-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 22%); grid-template-areas: "map legend" "panel panel"; gap: 14px; align-items: start; }
.gss .gss-map-column { grid-area: map; }
.gss .gss-panel { grid-area: panel; }
.gss .gss-map-column, .gss .gss-panel { min-width: 0; }
.gss .gss-stage {
  position: relative;
  border: 1px solid #c8d4d0;
  border-radius: 10px;
  overflow: hidden;
  background: #dbe9ec;
}
.gss .gss-map { cursor: grab; touch-action: pan-y pinch-zoom; }
.gss .gss-map.gss-touch-active { touch-action: none; }
.gss .gss-map.gss-panning { cursor: grabbing; }
.gss .gss-map svg { display: block; width: 100%; height: auto; aspect-ratio: 968 / 722; user-select: none; }
.gss .gss-geology path { fill-rule: evenodd; }
.gss .gss-geology path.gss-age-muted { opacity: .43; }
.gss .gss-geology path.gss-age-active { stroke: var(--age-accent); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.gss .gss-ages-off .gss-geology { display: none; }
.gss .gss-water { fill: #dcecf0; fill-opacity: .53; }
.gss .gss-ages-off .gss-water { fill-opacity: 1; }
.gss .gss-shore { fill: none; stroke: #8ba9af; stroke-width: .65; opacity: .62; }
.gss .gss-borders { fill: none; stroke: #56615c; stroke-width: .82; opacity: .72; }
.gss .gss-shore, .gss .gss-borders, .gss .gss-outline, .gss .gss-comparison { vector-effect: non-scaling-stroke; }
.gss .gss-boundary-layer, .gss .gss-structure-labels, .gss .gss-places { pointer-events: none; }
.gss .gss-structure-labels text { pointer-events: auto; cursor: pointer; }
.gss .gss-comparison { fill: none; stroke: #6658a0; stroke-width: 1.25; opacity: .8; pointer-events: none; }
.gss .gss-outline {
  stroke: var(--shape-color);
  fill: var(--shape-color);
  stroke-opacity: .83;
  fill-opacity: .062;
  stroke-width: 1.36;
  stroke-linejoin: round;
  fill-rule: evenodd;
}
.gss .gss-objects .gss-outline, .gss .gss-point-hit { cursor: pointer; }
.gss .gss-outline[data-draw="line"] { fill: none; stroke-width: 1.32; }
.gss .gss-outline[data-draw="fill"] { stroke: none; fill-opacity: .14; }
.gss .gss-outline[data-kind="domain"][data-draw="fill"] { fill-opacity: .19; }
.gss .gss-outline[data-kind="zone"][data-draw="fill"] { fill-opacity: .115; }
.gss .gss-outline[data-kind="zone"][data-draw="line"] { stroke-width: 1.4; stroke-opacity: .87; }
.gss .gss-active .gss-outline { stroke-width: 2.4; stroke-opacity: 1; fill-opacity: .17; }
.gss .gss-active .gss-outline[data-draw="fill"] { fill-opacity: .32; }
.gss .gss-context { pointer-events: none; }
.gss .gss-outline[data-draw="buried"] { fill: none; stroke: #998cae; stroke-opacity: .86; stroke-width: 1.45; }
.gss .gss-active .gss-outline[data-draw="buried"] { stroke: #8c7b9f; stroke-width: 2; }
.gss .gss-outline[data-draw="extent-fill"] { stroke: none; fill-opacity: .055; }
.gss .gss-active .gss-outline[data-draw="extent-fill"] { fill-opacity: .10; }
.gss .gss-compared:not(.gss-active) .gss-outline[data-draw="fill"] { fill-opacity: .04; }
.gss .gss-active .gss-outline[data-kind="zone"][data-draw="fill"] { fill-opacity: .16; }
.gss .gss-outline[data-kind="interpreted"] { stroke-width: 1.1; fill-opacity: .095; }
.gss .gss-active .gss-outline[data-kind="interpreted"] { stroke-width: 2.4; fill-opacity: .19; }
.gss .gss-outline[data-kind="correlation"] { stroke-opacity: .61; }
.gss .gss-outline[data-kind="extent"][data-draw="fill"] { fill-opacity: .11; }
.gss .gss-active .gss-outline[data-kind="extent"][data-draw="fill"] { fill-opacity: .24; }
.gss .gss-outline[data-kind="point"], .gss .gss-outline[data-kind="locality"] { fill: #fffefa; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1.9; }
.gss .gss-active .gss-outline[data-kind="point"], .gss .gss-active .gss-outline[data-kind="locality"] { stroke-width: 2.9; }
.gss .gss-context .gss-outline { fill-opacity: .025; stroke-opacity: .43; stroke-width: .95; }
.gss .gss-map-text {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 570;
  paint-order: stroke;
  stroke: #fffdf4;
  stroke-linejoin: round;
}
.gss .gss-map-text[data-kind="water"] { fill: #486d7a; font-style: italic; }
.gss .gss-map-text[data-kind="geo"] { fill: #334c3c; font-weight: 730; }
.gss .gss-map-text[data-kind="country"] { fill: #596d60; letter-spacing: .04em; }
.gss .gss-map-text[data-kind="territory"] { fill: #596d60; }
.gss .gss-map-text[data-kind="structure"] { font-weight: 720; }
.gss .gss-map-text[data-kind="structure"]:hover { text-decoration: underline; }

.gss .gss-zoom {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  border: 1px solid #b4c8c4;
  border-radius: 7px;
  overflow: hidden;
  background: #fffefa;
}
.gss .gss-zoom button { width: 38px; height: 36px; padding: 0; background: transparent; border: 0; font-size: 1.35rem; line-height: 1; }
.gss .gss-zoom button + button { border-top: 1px solid #d6e0da; }
.gss .gss-zoom button:hover:not(:disabled) { background: #eef4ee; }
.gss .gss-zoom button:focus-visible { outline-offset: -3px; }
.gss .gss-scale {
  position: absolute;
  left: 10px;
  bottom: 9px;
  padding: 4px 6px 3px;
  border-radius: 4px;
  color: #374a40;
  background: #fffff3e8;
  font-size: .69rem;
  pointer-events: none;
}
.gss .gss-scale i { display: block; margin-top: 2px; border: solid #486254; border-width: 0 1px 2px; height: 4px; }
.gss .gss-focus-source {
  display: block;
  min-height: 38px;
  padding: 5px 0 0;
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: .83rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.gss .gss-touch {
  display: none;
  position: absolute;
  bottom: 9px;
  right: 9px;
  min-height: 38px;
  padding: 6px 9px;
  border: 1px solid #b4c8c4;
  border-radius: 6px;
  background: #fffefa;
  font-size: .77rem;
}
.gss .gss-touch[aria-pressed="true"] { background: #e5eee3; border-color: #96b29c; }
.gss .gss-map-key { grid-area: legend; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f5f8f3; }
.gss .gss-map-key-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.gss .gss-map-key-heading small { color: var(--muted); font-size: .72rem; }
.gss .gss-map-key .gss-overlay-toggle { min-height: 32px; margin-top: 5px; }
.gss .gss-ages { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 5px; }
.gss .gss-ages button, .gss .gss-pudost {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  min-height: 31px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #405047;
  text-align: left;
  font-size: .8rem;
  line-height: 1.3;
}
.gss :is(.gss-ages button, .gss-pudost):hover,
.gss :is(.gss-ages button, .gss-pudost)[aria-pressed="true"] { border-color: #bdc9bc; background: #eaf0e7; }
.gss .gss-ages i { width: 13px; height: 11px; border-radius: 2px; border: 1px solid #51644a38; background: var(--age-color); flex: none; }
.gss .gss-pudost { width: 100%; min-height: 44px; margin-top: 6px; }
.gss .gss-pudost strong, .gss .gss-pudost small { display: block; }
.gss .gss-pudost small { font-size: inherit; color: var(--muted); }
.gss .gss-pudost-marker { width: 11px; height: 11px; flex: none; margin-inline: 1px; border: 2px solid var(--shape-color); border-radius: 50%; }
.gss .gss-age-note { margin: 6px 2px 0; color: var(--muted); font-size: .75rem; }
.gss .gss-supplemental-ages { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: .78rem; }
.gss .gss-supplemental-ages summary { cursor: pointer; }
.gss .gss-supplemental-ages .gss-ages { margin-top: 4px; }
.gss .gss-list i { width: 11px; height: 10px; flex: none; border: 1.3px solid var(--shape-color, #667f70); border-radius: 2px; }
.gss i[data-kind="domain"] { background: #6b6b9b35; border-color: var(--shape-color, #575386); }
.gss i[data-kind="zone"] { background: #28716a56; border-color: var(--shape-color, #28716a); }
.gss i[data-kind="extent"] { background: var(--shape-color, #adbdaf); border-color: transparent; opacity: .6; }
.gss i[data-kind="point"], .gss i[data-kind="locality"] { width: 9px; height: 9px; border-radius: 50%; border-width: 2px; }

.gss .gss-panel { border: 1px solid var(--line); border-radius: 10px; background: #f5f8f3; overflow: hidden; }
.gss .gss-panel-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 12px 12px 9px; }
.gss .gss-search-label { flex: 1 1 210px; min-width: 0; max-width: 350px; }
.gss .gss-search-label input { width: 100%; min-width: 0; padding: 8px; border: 1px solid #ced9cd; border-radius: 5px; font-size: .83rem; background: #fff; }
.gss .gss-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 2px 8px; padding: 0 11px 11px; max-height: 340px; overflow: auto; scrollbar-gutter: stable; }
.gss .gss-list > :is(h4, p) { grid-column: 1 / -1; }
.gss .gss-list h4 { margin: 8px 5px 4px; color: var(--muted); font-size: .77rem; }
.gss .gss-list p { padding: 7px; color: var(--muted); font-size: .79rem; }
.gss .gss-list button {
  display: flex;
  width: 100%;
  gap: 7px;
  align-items: start;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 6px 5px;
  min-height: 33px;
  text-align: left;
  overflow-wrap: anywhere;
  font-size: .82rem;
  line-height: 1.29;
}
.gss .gss-list button:hover { background: #eaf0e7; }
.gss .gss-list button[aria-pressed="true"] { background: #e5eee3; border-color: #adc3ae; font-weight: 690; }
.gss .gss-list button[data-kind="none"] { color: #64716a; }
.gss .gss-row-context { display: block; margin-top: 2px; color: var(--muted); font-size: .71rem; font-weight: 400; }
.gss .gss-list i { margin: 4px 0 0 1px; }
.gss .gss-list i[data-kind="interpreted"] { background: #ddd5ec; }
.gss .gss-list i[data-kind="correlation"] { border-color: var(--shape-color); opacity: .65; }
.gss .gss-list i[data-kind="region"], .gss .gss-list i[data-kind="none"] { border: 0; width: 9px; height: 2px; margin-top: 8px; background: #86988b; }

.gss .gss-info { margin: 0 12px 6px; padding: 12px; border: 1px solid #cbdacc; border-radius: 6px; background: #fffefa; font-size: .86rem; scroll-margin-top: 7rem; }
.gss .gss-info-heading { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.gss .gss-info h4 { font-size: .93rem; margin-bottom: 5px; overflow-wrap: anywhere; }
.gss .gss-info-heading button { flex: none; min-width: 28px; min-height: 26px; padding: 0 4px; border: 1px solid var(--line); border-radius: 5px; background: transparent; font-size: 1rem; }
.gss .gss-info-heading button:hover { background: #eef4ee; }
.gss .gss-info h5 { font-size: .78rem; margin: 9px 0 4px; }
.gss .gss-info p { font-size: .79rem; color: #4e5e53; }
.gss .gss-info .gss-type { color: #365744; font-size: .73rem; font-weight: 650; margin-bottom: 4px; }
.gss .gss-info .gss-geometry-method { margin-top: 4px; font-size: .74rem; }
.gss .gss-info ul { padding-inline-start: 15px; margin: 0 0 4px; }
.gss .gss-info ol { padding-inline-start: 22px; margin: 5px 0 3px; }
.gss .gss-info li { margin: 4px 0; font-size: .75rem; line-height: 1.35; }
.gss .gss-info-sources { margin: 8px 0; }
.gss .gss-info-sources summary { cursor: pointer; color: var(--ink); font-size: .78rem; font-weight: 650; }
.gss .gss-connections { list-style: none; padding: 0 !important; }
.gss .gss-connections li { margin: 5px 0 0; padding: 5px 6px; border-left: 2px solid #a9bda8; background: #f3f7ef; }
.gss .gss-relation-label { display: block; color: #4e5e53; }
.gss .gss-connections button { padding: 0; border: 0; background: none; color: var(--green); font-size: .76rem; text-align: left; text-decoration: underline; text-underline-offset: 2px; }
.gss .gss-connections .gss-relation-refs { margin-left: 4px; color: var(--muted); }
.gss .gss-compare-control { margin-top: 7px; min-height: 30px; padding: 4px 8px; border: 1px solid #cfc8e2; border-radius: 5px; background: #faf7ff; color: #5a487e; text-align: left; font-size: .76rem; }
.gss .gss-compare-control[aria-pressed="true"] { background: #e7def5; }
.gss .gss-card-link { display: inline-block; margin-top: 5px; font-weight: 630; }
.gss .gss-related { display: flex; flex-wrap: wrap; gap: 4px; }
.gss .gss-related button { background: #f5f8f3; border: 1px solid #d2ded2; border-radius: 5px; min-height: 32px; padding: 4px 6px; font-size: .75rem; text-align: left; }
.gss .gss-related button:hover { background: #e8efe6; }
.gss .gss-footer { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 7px 18px; margin-top: 12px; }
.gss .gss-method { max-width: 90ch; color: var(--muted); font-size: .8rem; }
.gss .gss-method summary { cursor: pointer; color: var(--ink); font-weight: 640; }
.gss .gss-method p { max-width: 90ch; margin-top: 6px; font-size: .8rem; }
.gss .gss-places-link { font-size: .8rem; }

@media (max-width: 800px) {
  .gss .gss-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "map" "legend" "panel"; gap: 11px; }
  .gss .gss-ages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gss .gss-ages button { min-height: 40px; }
  .gss .gss-list { max-height: 276px; }
  .gss .gss-list button { min-height: 40px; }
  .gss .gss-zoom button { width: 43px; height: 41px; }
  .gss .gss-regions button { min-height: 39px; }
  .gss .gss-map { scroll-margin-top: 7rem; }
}

@media (max-width: 540px) {
  .gss .gss-levels { width: 100%; }
  .gss .gss-levels button { flex: 1 1 0; min-width: 0; padding-inline: 4px; }
  .gss :is(.gss-regions, [data-gss-regions]) { flex-wrap: nowrap; }
  .gss .gss-regions { overflow-x: auto; padding: 2px; scrollbar-width: thin; }
  .gss .gss-regions button { flex-shrink: 0; white-space: nowrap; }
  .gss .gss-list { grid-template-columns: minmax(0, 1fr); }
}

@media (any-pointer: coarse) { .gss .gss-touch { display: block; } }

/* The overview route has a map. Node and document routes use the original tree layout. */
.gsn-page:has(> #geostructure-scheme) {
  grid-template-columns: minmax(0, 1186px);
  align-content: start;
  padding-bottom: 24px;
}

.gsn-page:has(> #geostructure-scheme) > :is(.gsn-sidebar, .gsn-content) {
  display: none;
}

#geostructure-scheme {
  align-self: start;
  margin-bottom: 0;
}

.gss .gss-catalogue-link {
  display: inline-block;
  font-size: .75rem;
  line-height: 1.4;
}

.gss .gss-description {
  margin-top: 22px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.gss .gss-essay {
  max-width: 83ch;
  margin-top: 10px;
  font-size: .95rem;
}

.gss .gss-essay p {
  max-width: none;
  margin: 0;
  color: var(--ink);
  font-size: inherit;
  line-height: 1.53;
  text-indent: 1.35em;
}

.gss .gss-essay strong { font-weight: 650; }
.gss .gss-essay-cite { font-size: .86em; white-space: nowrap; }
.gss .gss-essay-sources {
  max-width: 96ch;
  margin: 10px 0 12px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  font-size: .82rem;
}

.gss .gss-essay-sources summary { width: fit-content; cursor: pointer; font-weight: 640; }
.gss .gss-essay-sources ol { margin: 7px 0 0; padding-inline-start: 1.55em; }
.gss .gss-essay-sources li { padding: 3px 4px; line-height: 1.45; scroll-margin-top: 16px; }
.gss .gss-essay-sources li:target { background: #eaf1e6; border-radius: 4px; }
