@font-face{font-family:"Atlas Serif";font-style:normal;font-weight:200 800;font-display:swap;src:url("assets/d1d45ca3ed56e09f1081.woff2") format("woff2");}
@font-face{font-family:"Atlas Sans";font-style:normal;font-weight:100 700;font-display:swap;src:url("assets/e291b60bbb1859d657bb.woff2") format("woff2");}
@font-face{font-family:"Atlas Mono";font-style:normal;font-weight:400;font-display:swap;src:url("assets/ba204497f16b6d334cee.woff2") format("woff2");}
@font-face{font-family:"Atlas Mono";font-style:normal;font-weight:600;font-display:swap;src:url("assets/6a825b4824c01cbb401e.woff2") format("woff2");}
/* OFL-Newsreader.txt
Copyright 2020 The Newsreader Project Authors (http://github.com/productiontype/Newsreader)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded, 
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
*/
/* OFL-Plex-Mono.txt
Copyright © 2017 IBM Corp. with Reserved Font Name "Plex"

This Font Software is licensed under the SIL Open Font License, Version 1.1.

This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded, 
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

*/
/* OFL-Plex-Sans.txt
Copyright © 2017 IBM Corp. with Reserved Font Name "Plex"

This Font Software is licensed under the SIL Open Font License, Version 1.1.

This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded, 
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

*/
:root { --cover: url("assets/a33743c705ac19bdf53a.webp"); }
:root {
  color-scheme: light;
  --paper: #eee7d9;
  --paper-light: #f8f2e7;
  --paper-shadow: #e4dac7;
  --line: #bdb19b;
  --ink: #22231f;
  --muted: #59564c;
  --oxide: #934027;
  --chart: #0c1010;
  --chart-line: #5a5548;
  --ivory: #f5ebd6;
  --copper: #e1ac79;
  --serif: "Atlas Serif", Georgia, "Times New Roman", serif;
  --sans: "Atlas Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "Atlas Mono", "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  background: radial-gradient(ellipse at 49% 3%, #f7f0e4, transparent 51rem), var(--paper);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
}
button, input, select { font: inherit; }
button, summary { color: inherit; cursor: pointer; }
a { color: var(--oxide); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--oxide); outline-offset: 3px; }
[hidden] { display: none !important; }
::selection { background: #a84b30; color: white; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.shell { width: min(100%, 1590px); margin-inline: auto; padding-inline: clamp(14px, 4.1vw, 70px); }

.mast {
  height: 65px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 9px; font: bold 21px/1 var(--serif); letter-spacing: -.04em; white-space: nowrap; }
.brandmark {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--oxide);
  border-radius: 50%;
  color: var(--oxide);
  font: 18px/1 var(--serif);
}
.mast-edition, .folio, .eyebrow {
  color: var(--muted);
  font: 600 10px/1.3 var(--mono);
  letter-spacing: .15em;
  text-transform: uppercase;
}
.mast-edition span, .footer b { color: var(--oxide); margin-inline: 3px; }
.tiny-button, .plain-button {
  padding: 0;
  background: none;
  border: 0;
  color: var(--ink);
  font: 600 12px/1.4 var(--sans);
}
.tiny-button { justify-self: end; min-height: 40px; white-space: nowrap; }
.tiny-button span, .plain-button:hover, .tiny-button:hover { color: var(--oxide); }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-items: center;
  min-height: 337px;
  padding: 37px clamp(28px, 4vw, 64px);
  color: var(--ivory);
  background: #101211;
}
.hero::before {
  position: absolute;
  inset: 10px;
  z-index: -1;
  border: 1px solid #d9aa713a;
  content: "";
  pointer-events: none;
}
.hero-art {
  position: absolute;
  z-index: -2;
  inset: 0 0 0 24%;
  background-image: linear-gradient(90deg, #101211 0%, #10121143 24%, #10121100 44%, #1012111c 82%, #10121144 100%), var(--cover);
  background-color: #141614;
  background-size: cover;
  background-position: 70% 27%;
}
.hero-copy { width: max-content; max-width: min(100%, 670px); }
.eyebrow { color: var(--copper); display: flex; gap: 9px; align-items: center; }
.eyebrow i { width: 22px; height: 1px; background: currentColor; }
.hero h1 {
  margin: 10px 0 12px;
  font: 400 clamp(57px, 6.3vw, 110px)/.82 var(--serif);
  letter-spacing: -.081em;
  text-shadow: 0 2px 35px #0e110e;
}
.hero h1 em { display: block; font-weight: inherit; color: #e4c8a0; }
.hero p { max-width: 350px; margin: 17px 0 14px; color: #ebdfcd; font-size: 14px; }
.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 7px 0 5px;
  border-bottom: 1px solid var(--copper);
  color: var(--ivory);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.hero-link span { color: var(--copper); }
.hero-link:hover { color: var(--copper); }
.hero-link:focus-visible { outline-color: var(--copper); }
.hero-caption {
  position: absolute;
  right: 23px;
  bottom: 23px;
  display: grid;
  gap: 2px;
  padding: 6px 10px;
  background: #111411db;
  color: var(--ivory);
  font: italic 16px/1.2 var(--serif);
}
.hero-caption span:first-child { color: var(--copper); font: 9px/1.2 var(--mono); letter-spacing: .13em; }
.hero-caption b { color: var(--copper); }

#pruzkum { scroll-margin-top: 12px; }
.spread-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 13px;
  padding: 23px 0 15px;
}
.folio { color: var(--oxide); }
.spread-title h2 { margin: 2px 0 0; font: 400 clamp(28px, 3.05vw, 48px)/1 var(--serif); letter-spacing: -.055em; }
.hero-stats { display: flex; gap: clamp(9px, 1.55vw, 25px); }
.hero-stat { display: flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.hero-stat strong { font: 400 24px/1 var(--serif); color: var(--oxide); }
.hero-stat small { font-size: 11px; color: var(--muted); }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, 295px); gap: 19px; }

.board {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: clamp(560px, 54vw, 690px);
  border: 1px solid #3f4035;
  background: var(--chart);
  color: var(--ivory);
  color-scheme: dark;
}
.board :focus-visible { outline-color: var(--copper); }
.map-bar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 13px;
  border-bottom: 1px solid var(--chart-line);
  background: #171b18;
}
.map-tabs, .find-group { display: flex; align-items: center; gap: 7px; min-width: 0; }
.map-tabs { gap: 3px; }
.map-tabs button, .filters summary {
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid transparent;
  background: transparent;
  color: #dfd3bf;
  font: 600 12px/1.2 var(--sans);
  white-space: nowrap;
}
.map-tabs button[aria-pressed=true] { background: #eddcc0; color: #211b13; }
.map-tabs button:hover:not([aria-pressed=true]), .filters summary:hover { color: var(--copper); border-color: var(--chart-line); }
.search-group { position: relative; min-width: 0; }
.search-box {
  height: 34px;
  width: min(23vw, 245px);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 8px;
  background: #0e1311;
  border: 1px solid #645e4f;
}
.search-box:focus-within { border-color: var(--copper); }
.search-icon { width: 11px; height: 11px; flex: 0 0 11px; border: 1px solid var(--copper); border-radius: 50%; position: relative; margin-right: 2px; }
.search-icon::after { content: ""; position: absolute; width: 5px; height: 1px; background: var(--copper); transform: rotate(45deg); top: 9px; left: 8px; }
.search-box input { width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--ivory); font-size: 13px; }
.search-box input:focus { outline: none; }
.search-box input::placeholder { color: #c1b8a7; }
.search-box kbd { padding: 0 3px; color: #b6aa94; border: 1px solid #645e4f; font: 10px/1.4 var(--mono); }
.hits {
  position: absolute;
  z-index: 2;
  top: calc(100% + 5px);
  right: 0;
  width: max(100%, min(275px, calc(100vw - 36px)));
  padding: 4px;
  color: var(--ink);
  background: var(--paper-light);
  border: 1px solid var(--line);
  box-shadow: 0 9px 24px #08080455;
}
.hits p { margin: 5px 7px; font-size: 11px; color: var(--muted); }
.filters { position: relative; }
.filters summary { display: flex; align-items: center; gap: 5px; list-style: none; }
.filters summary::-webkit-details-marker { display: none; }
.filter-icon { color: var(--copper); font-size: 16px; }
#filter-count {
  display: inline-grid;
  min-width: 15px;
  height: 15px;
  place-items: center;
  background: #eddcc0;
  color: #3e271c;
  font: 10px/1 var(--mono);
}
.filters[open] summary { color: var(--copper); border-color: var(--chart-line); }
.filter-inner {
  position: absolute;
  z-index: 3;
  top: calc(100% + 6px);
  right: 0;
  width: min(286px, calc(100vw - 38px));
  max-height: min(470px, 72dvh);
  overflow: auto;
  padding: 10px 13px;
  border: 1px solid var(--line);
  box-shadow: 0 9px 24px #08080455;
  background: var(--paper-light);
  color: var(--ink);
  color-scheme: light;
}
.filter-inner :focus-visible { outline-color: var(--oxide); }
.search-label { display: block; margin: 6px 0 3px; color: var(--muted); font-size: 11px; font-weight: 600; }
.filter-inner select { width: 100%; min-width: 0; height: 32px; padding-inline: 5px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 13px; }
.zone-head { display: flex; justify-content: space-between; margin: 11px 0 3px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font: 10px/1.3 var(--mono); text-transform: uppercase; }
.zones { display: grid; gap: 1px; }
.zone, .hit, .list-entry, .connection, .route-card, .featured, .steps button {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: none;
}
.zone { display: grid; grid-template-columns: 20px 1fr auto; gap: 5px; align-items: center; padding: 4px 5px; font-size: 12px; }
.zone span:first-child, .hit b { color: var(--oxide); font: 10px var(--mono); }
.zone span:last-child { color: var(--muted); font: 10px var(--mono); }
.zone[aria-pressed=true] { border-color: var(--oxide); background: #edd7c6; }
.hit { display: flex; gap: 8px; align-items: baseline; padding: 6px 5px; font-size: 13px; }
.hit span { margin-left: auto; }
.zone:hover, .hit:hover, .featured:hover, .connection:hover, .steps button:hover { background: #e7ddca; }
.reset { margin-top: 5px; padding-block: 5px; color: var(--oxide); }

.viewport, .list-panel { position: relative; flex: 1; min-height: 0; }
.sector-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 2px 10px;
  border-bottom: 1px solid var(--chart-line);
  background: #23261d;
}
.sector-strip strong {
  color: var(--ivory);
  font: 400 16px/1.2 var(--serif);
  text-align: center;
  overflow-wrap: anywhere;
}
.sector-strip button {
  min-height: 30px;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: var(--copper);
  font-size: 11px;
  white-space: nowrap;
}
.sector-strip button:hover { text-decoration: underline; }
.sector-strip button:disabled { visibility: hidden; }
.viewport { overflow: hidden; background: radial-gradient(ellipse at 50% 46%, #20231c 0%, #0c1010 75%); }
canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
canvas:active { cursor: grabbing; }
canvas:focus-visible { outline-offset: -4px; }
.map-corner { position: absolute; width: 14px; height: 14px; border: 1px solid #b1a28a8a; pointer-events: none; }
.tl { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.tr { top: 12px; right: 12px; border-left: 0; border-bottom: 0; }
.bl { bottom: 12px; left: 12px; border-top: 0; border-right: 0; }
.br { bottom: 12px; right: 12px; border-top: 0; border-left: 0; }
.map-meta { position: absolute; top: 16px; left: 33px; right: 33px; display: flex; justify-content: space-between; color: #c7baa4; font: 10px/1.1 var(--mono); letter-spacing: .1em; pointer-events: none; }
.map-meta b { color: var(--copper); }
.zoom { position: absolute; right: 22px; bottom: 22px; display: flex; gap: 5px; }
.zoom button { width: 35px; height: 34px; border: 1px solid #766c57; background: #171d18f5; color: var(--ivory); font: 18px/1 var(--serif); }
.zoom button:hover { border-color: var(--copper); color: var(--copper); }
.map-foot { min-height: 39px; padding: 6px 13px; display: flex; align-items: center; justify-content: space-between; gap: 5px 8px; border-top: 1px solid var(--chart-line); background: #171b18; color: #e0d3bc; font: 10px/1.3 var(--mono); }
.map-foot > span:first-child { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.map-foot i { width: 7px; height: 7px; display: inline-block; margin-left: 6px; }
.map-foot i:first-child { margin-left: 0; }
.circle-key { border-radius: 50%; background: #c1b291; }
.diamond-key { border: 1px solid #c1b291; transform: rotate(45deg); }
.ring-key { border: 1px solid #edb684; border-radius: 50%; }
.empty-map { position: absolute; inset: 43% 11% auto; padding: 12px; text-align: center; border: 1px solid var(--chart-line); background: #111714ee; pointer-events: none; }
.tooltip { position: absolute; z-index: 2; max-width: min(245px, 70%); padding: 7px 9px; border: 1px solid #b8a17e; box-shadow: 0 6px 17px #05050570; background: #1c221bed; color: var(--ivory); font-size: 13px; pointer-events: none; }
.tooltip small { display: block; margin-bottom: 2px; color: var(--copper); font: 10px/1.2 var(--mono); }
.list-panel { overflow: auto; padding: 12px 15px; scrollbar-color: #625846 #111713; }
.list-top { margin-bottom: 7px; color: #dccdb4; font: 11px var(--mono); }
.list-entry { display: grid; grid-template-columns: 50px 1fr auto; align-items: center; gap: 7px; padding: 8px 6px; border-bottom-color: #454336; }
.list-entry b { color: var(--copper); font: 10px var(--mono); }
.list-entry small { color: #ddceb7; font-size: 11px; text-align: right; }
.list-entry:hover, .list-entry[aria-current=true] { background: #29291f; border-color: #8b7759; }
.list-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-block: 12px; color: var(--ivory); font: 11px var(--mono); }
.list-nav .small-action { border-color: #776b54; background: #21261d; color: var(--ivory); }

.inspector {
  min-width: 0;
  height: clamp(560px, 54vw, 690px);
  display: flex;
  flex-direction: column;
  border-block: 1px solid var(--line);
}
.rail-head { height: 49px; flex: 0 0 49px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.rail-head h2 { margin: 0; font: 400 20px/1.15 var(--serif); }
.index { padding: 2px 5px; border: 1px solid var(--oxide); color: var(--oxide); font: 10px var(--mono); }
.close-dossier { width: 30px; height: 30px; margin-left: auto; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 23px/1 var(--serif); }
.close-dossier:hover { border-color: var(--oxide); color: var(--oxide); }
.detail { flex: 1; min-height: 0; overflow: auto; padding: 14px 9px 17px 0; scrollbar-color: #aa997e var(--paper); }
.detail h3 { margin: 0 0 7px; font: 400 30px/.99 var(--serif); letter-spacing: -.045em; overflow-wrap: anywhere; }
.detail p { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.sector-detail { margin-bottom: 10px; padding: 10px 0 9px; border-block: 1px solid var(--line); }
.sector-detail .featured { padding-block: 7px; }
.section-label { margin: 14px 0 6px; color: var(--oxide); font: 600 10px/1.35 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.route-card { display: grid; grid-template-columns: 26px 1fr auto; gap: 5px; align-items: center; padding: 8px 3px; border-bottom-color: #bdb19ba8; color: var(--ink); font: 16px/1.15 var(--serif); }
.route-card:first-of-type { border-top-color: #bdb19ba8; }
.route-card:hover { background: var(--paper-shadow); border-bottom-color: var(--oxide); }
.route-card b { color: var(--oxide); font: 10px/1 var(--mono); }
.route-card i { color: var(--oxide); font: 12px/1 var(--sans); }
.featured { display: flex; align-items: baseline; gap: 6px; padding: 5px 3px; font-size: 12px; }
.featured b { color: var(--oxide); font: 10px var(--mono); white-space: nowrap; }
.featured span { margin-left: auto; color: var(--oxide); }
.detail .dossier-id { margin: 1px 0 6px; color: var(--oxide); font: 10px/1.4 var(--mono); letter-spacing: .1em; }
.status { display: inline-block; margin-bottom: 4px; padding: 3px 5px; border: 1px solid #655b4b; color: #44382a; font: 10px/1.2 var(--mono); }
.scope { margin-left: 5px; color: var(--muted); font-size: 10px; }
.subtle-box { margin: 7px 0; padding: 8px 9px; border-left: 2px solid #a77c55; background: #e3d7c0; }
.subtle-box .section-label { margin-top: 0; }
.subtle-box p:last-child { margin-bottom: 0; }
.research .subtle-box { border-left-color: #49624e; background: #e0e2d0; }
.research .section-label { color: #405a45; }
.findings-label { margin-top: 12px; }
.research-findings { list-style: none; padding: 0; margin: 0 0 10px; }
.research-findings li { padding: 7px 0; border-bottom: 1px solid #a2a18470; }
.research-findings h4 { margin: 0 0 3px; color: #405a45; font: 700 13px var(--serif); }
.research-findings p { margin: 0; }
.research-findings p + p { margin-top: 6px; }
.finding-refs { font-size: .85em; white-space: nowrap; }
.dossier-plate {
  margin: 9px 0 11px;
  border: 1px solid var(--line);
  background: #151711;
}
.dossier-plate img, .generated-plate { display: block; width: 100%; }
.dossier-plate img { max-height: 200px; object-fit: contain; }
.dossier-plate figcaption {
  padding: 4px 7px;
  color: #e9d9bb;
  font: 10px/1.45 var(--sans);
  overflow-wrap: anywhere;
}
.dossier-plate figcaption a { color: #ecc293; }
.context-sources small { display: block; color: var(--muted); }
.research-leads p { font-size: 11px; }
.source-list { list-style: none; display: grid; gap: 4px; margin: 0 0 8px; padding: 0; }
.source-list li { font-size: 11px; overflow-wrap: anywhere; }
.connection-box { margin-bottom: 5px; padding: 3px 5px; border: 1px solid #bdb19ba8; background: #f4ecde; }
.connection { display: block; padding: 3px; font-size: 13px; }
.connection b { display: block; margin-bottom: 2px; color: var(--oxide); font: 9px/1.35 var(--mono); text-transform: uppercase; }
.connection-box p { margin: 0 3px 4px; font-size: 11px; }
.connection-box a { display: block; margin: 0 3px 3px; font-size: 11px; }
.small-action { padding: 5px 7px; border: 1px solid var(--line); background: var(--paper-light); color: var(--ink); font: 600 11px/1.35 var(--sans); }
.small-action:hover { border-color: var(--oxide); }
.small-action:disabled { opacity: .48; cursor: default; }
.detail .small-action { margin: 1px 2px 4px 0; }
.step-controls { display: flex; align-items: center; justify-content: space-between; gap: 3px; margin: 4px 0 9px; color: var(--muted); font: 10px/1.4 var(--mono); }
.steps { list-style: none; display: grid; gap: 2px; margin: 0 0 6px; padding: 0; }
.steps button { padding: 4px 5px; display: flex; align-items: baseline; gap: 5px; color: var(--ink); font-size: 12px; }
.steps button b { color: var(--oxide); font: 10px var(--mono); }
.steps button[aria-current=step] { border-color: var(--oxide); background: #edd7c6; }

.footer { display: flex; justify-content: space-between; align-items: center; gap: 7px; padding-block: 15px; color: var(--muted); font: 10px/1.35 var(--mono); }
dialog {
  width: min(600px, calc(100vw - 27px));
  max-height: 86dvh;
  padding: 18px 21px 21px;
  border: 1px solid #71624e;
  background: var(--paper-light);
  color: var(--ink);
  box-shadow: 0 20px 90px #1713089e;
}
dialog::backdrop { background: #17170fc0; }
.dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
dialog .eyebrow { color: var(--oxide); }
dialog h2 { margin: 6px 0; font: 400 36px/1.05 var(--serif); letter-spacing: -.04em; }
dialog h3 { margin: 14px 0 5px; font: 400 21px/1.1 var(--serif); }
dialog p, dialog dl { margin: 6px 0 10px; color: var(--muted); font-size: 13px; }
dialog dt { color: var(--ink); font-weight: 700; }
dialog dd { margin: 0 0 5px; }
#path-query, #path-mode { width: 100%; padding: 7px 9px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
#path-results { margin-top: 4px; }
#path-output ol { margin: 0; padding: 0; list-style: none; }
.path-step { margin-bottom: 4px; padding: 6px 8px; border-left: 2px solid var(--oxide); background: var(--paper-shadow); font-size: 13px; }
.path-step button { width: auto; font-size: 13px; }
.path-step small { display: block; padding-bottom: 2px; color: var(--muted); font: 10px/1.4 var(--mono); }

@media (max-width: 950px) {
  .workspace { grid-template-columns: 1fr; gap: 15px; }
  .inspector { height: auto; min-height: 260px; }
  .inspector .intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .detail { max-height: none; overflow: visible; }
  .hero { min-height: 311px; }
  .search-box { width: min(35vw, 245px); }
}
@media (max-width: 650px) {
  .mast { height: 53px; grid-template-columns: 1fr auto; }
  .mast-edition { display: none; }
  .hero { min-height: 320px; padding: 25px; }
  .hero-art { left: 0; background-position: 67% 50%; }
  .hero-art { background-image: linear-gradient(90deg, #101211ec 0%, #101211a3 36%, #1012110f 86%), var(--cover); }
  .hero h1 { font-size: clamp(53px, 11.9vw, 75px); }
  .hero p { max-width: 240px; font-size: 13px; }
  .hero-caption { right: 16px; bottom: 16px; font-size: 12px; }
  .hero-caption span:first-child { font-size: 8px; }
  .spread-head { align-items: start; flex-direction: column; padding-block: 18px 10px; gap: 9px; }
  .hero-stat strong { font-size: 18px; }
  .hero-stat small { font-size: 10px; }
  .board { height: 490px; }
  .map-bar { gap: 3px; padding: 5px; }
  .find-group { gap: 2px; }
  .map-tabs button, .filters summary { padding-inline: 5px; }
  .filters summary { gap: 3px; }
  .search-box { width: clamp(85px, 34vw, 200px); gap: 5px; padding-inline: 6px; }
  .search-box input { font-size: 12px; }
  .search-box kbd { display: none; }
  .search-group { position: static; }
  .hits { top: calc(100% + 4px); left: 6px; right: 6px; width: auto; }
  .map-meta { font-size: 8px; left: 28px; right: 28px; }
  .map-foot { padding-inline: 6px; font-size: 9px; }
  .map-foot i { margin-left: 2px; }
  .map-foot > span:first-child { gap: 3px; }
  .list-entry { grid-template-columns: 42px 1fr; }
  .list-entry small { grid-column: 2; text-align: left; }
  .inspector .intro-grid { display: block; }
}
@media (pointer: coarse) {
  .zoom button { width: 42px; height: 42px; }
  .map-tabs button, .search-box, .filters summary { min-height: 40px; }
}
@media (max-width: 360px) {
  .hero-caption { display: none; }
  .hero { min-height: 285px; }
  .hero-stats { gap: 8px; }
  .hero-stat { gap: 4px; }
  .hero-stat small { font-size: 9px; }
  .map-guide-text { font-size: 8px; }
  .sector-strip { gap: 4px; padding-inline: 5px; }
  .sector-strip strong { font-size: 14px; }
  .sector-strip button { font-size: 10px; }
}

/* The chart fills the window. Controls and reading surfaces sit above it. */
html:has(> body.immersive) { overflow: hidden; background: var(--chart); }

body.immersive {
  --screen-gap: clamp(10px, 1.4vw, 22px);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --chart-bar-height: 55px;
  --sector-height: 0px;
  --chrome-top: calc(var(--safe-top) + var(--chart-bar-height) + var(--sector-height));
  --chrome-bottom: calc(var(--safe-bottom) + 63px);
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--chart);
}

body.immersive:has(#sector-strip:not([hidden])) { --sector-height: 35px; }

.immersive > .shell {
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.immersive > .shell > :is(.mast, .hero, .footer),
.immersive #pruzkum > .spread-head { display: none; }

.immersive #pruzkum,
.immersive .workspace,
.immersive .board,
.immersive #viewport,
.immersive #map {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
}

.immersive #pruzkum,
.immersive .workspace,
.immersive .board { position: relative; }

.immersive .workspace,
.immersive .board { display: block; }

.immersive .board { border: 0; }

.immersive #viewport {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  background: #070c18;
}

.immersive .map-bar {
  position: absolute;
  z-index: 60;
  inset: 0 0 auto;
  height: calc(var(--safe-top) + var(--chart-bar-height));
  justify-content: flex-start;
  gap: clamp(7px, 1.2vw, 17px);
  padding: var(--safe-top) calc(var(--safe-right) + var(--screen-gap)) 0 calc(var(--safe-left) + var(--screen-gap));
  border-bottom: 1px solid #98764c78;
  background: #151814f2;
  box-shadow: 0 4px 14px #0507055e;
}

.immersive .map-brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
  color: var(--ivory);
  font: 600 clamp(16px, 1.75vw, 24px)/1 var(--serif);
  letter-spacing: -.04em;
  text-decoration: none;
  white-space: nowrap;
}

.immersive .map-brand .brandmark {
  width: 24px;
  height: 24px;
  color: var(--copper);
  border-color: #a77952;
  flex: 0 0 auto;
}

.immersive .map-brand small { color: var(--copper); font: 9px/1 var(--mono); letter-spacing: .08em; }
.immersive .map-tabs { flex: 0 0 auto; gap: 2px; }
.immersive .find-group { flex: 1 1 auto; justify-content: flex-end; gap: clamp(2px, .65vw, 10px); }
.immersive .search-group { flex: 0 1 225px; min-width: 74px; position: relative; }
.immersive .search-box { width: 100%; }
.immersive .hits { left: auto; right: 0; width: max(100%, min(280px, calc(100vw - 24px))); }
.immersive .map-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 3px; }

.immersive :is(#open-trails, #open-method, #toggle-fullscreen) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 5px;
  min-height: 34px;
  padding: 5px 7px;
  border: 1px solid transparent;
  background: transparent;
  color: #e1d6c2;
  font: 600 12px/1.2 var(--sans);
  white-space: nowrap;
}

.immersive :is(#open-trails, #open-method, #toggle-fullscreen):is(:hover, [aria-pressed=true], [aria-expanded=true]) {
  color: var(--copper);
  border-color: var(--chart-line);
  background: #25271e;
}

.immersive .map-action-icon { color: var(--copper); font-size: 15px; line-height: 1; }
.immersive .filters { flex: 0 0 auto; }
.immersive .filter-inner { max-height: calc(100dvh - var(--chrome-top) - 16px); overscroll-behavior: contain; }

.immersive #sector-strip {
  position: absolute;
  z-index: 45;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  top: calc(var(--safe-top) + var(--chart-bar-height));
  left: calc(var(--safe-left) + var(--screen-gap));
  right: calc(var(--safe-right) + var(--screen-gap));
  min-height: 0;
  height: 35px;
  border: 1px solid #93795279;
  border-top: 0;
  background: #24271eea;
}

.immersive #sector-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.immersive .map-corner.tl,
.immersive .map-corner.tr { top: calc(var(--chrome-top) + var(--screen-gap)); }
.immersive .map-corner.bl,
.immersive .map-corner.br { bottom: calc(var(--safe-bottom) + var(--screen-gap)); }
.immersive .map-corner.tl,
.immersive .map-corner.bl { left: calc(var(--safe-left) + var(--screen-gap)); }
.immersive .map-corner.tr,
.immersive .map-corner.br { right: calc(var(--safe-right) + var(--screen-gap)); }

.immersive .map-meta {
  inset: auto auto calc(var(--safe-bottom) + 52px) calc(var(--safe-left) + var(--screen-gap));
  display: inline-flex;
  gap: 10px;
  padding: 5px 7px;
  border: 1px solid #74674a85;
  background: #131814db;
  color: #e4d9c3;
}

.immersive .map-foot {
  position: absolute;
  z-index: 15;
  bottom: calc(var(--safe-bottom) + var(--screen-gap));
  left: calc(var(--safe-left) + var(--screen-gap));
  min-height: 29px;
  max-width: calc(100% - 165px - var(--safe-right) - var(--safe-left));
  padding: 5px 9px;
  border: 1px solid #74674a96;
  background: #131814ed;
  pointer-events: none;
}

.immersive .map-guide-text { margin-left: 6px; padding-left: 9px; border-left: 1px solid #74674a96; }
.immersive .zoom { bottom: calc(var(--safe-bottom) + var(--screen-gap)); right: calc(var(--safe-right) + var(--screen-gap)); }
.immersive .zoom button { box-shadow: 0 2px 7px #05070566; }
#zoom-value {
  display: grid;
  place-items: center;
  min-width: 48px;
  padding: 0 4px;
  border: 1px solid #776a51;
  background: #171d18f5;
  color: var(--ivory);
  font: 10px var(--mono);
  white-space: nowrap;
}
#show-links {
  pointer-events: auto;
  border: 1px solid #796c56;
  background: #111713;
  padding: 3px 5px;
  color: var(--ivory);
  font: inherit;
}
#show-links[aria-pressed=true] { color: #f2ce9d; border-color: #c59c6b; background: #332a1e; }
.immersive .window-panel.is-front { z-index: 42 !important; }
.immersive .window-panel.is-dragging { user-select: none; }
.immersive .window-panel:not([hidden]) { animation: surface-in 160ms ease-out; }
@keyframes surface-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .immersive .window-panel:not([hidden]) { animation: none; }
}
@media (min-width: 800px) and (pointer: fine) {
  .immersive .window-panel .panel-head { cursor: grab; }
  .immersive .window-panel.is-dragging .panel-head { cursor: grabbing; }
}
.immersive .empty-map { inset: auto auto 50% 50%; width: min(340px, 85vw); transform: translate(-50%, 50%); }

.immersive :is(#list-panel, #inspector) {
  position: absolute;
  top: calc(var(--chrome-top) + var(--screen-gap));
  bottom: var(--chrome-bottom);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: auto;
  overflow: hidden;
  border: 1px solid;
  box-shadow: 0 12px 34px #05070594;
}

.immersive #list-panel {
  z-index: 30;
  left: calc(var(--safe-left) + var(--screen-gap));
  width: clamp(280px, 32vw, 420px);
  padding: 0;
  border-color: #af9674;
  background: var(--paper-light);
  color: var(--ink);
}

.immersive #inspector {
  z-index: 35;
  right: calc(var(--safe-right) + var(--screen-gap));
  width: clamp(320px, 33vw, 472px);
  border-color: #a89677;
  background: var(--paper-light);
  color: var(--ink);
}

.immersive :is(#list-panel .panel-head, #inspector .rail-head) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 45px;
  min-width: 0;
  padding: 0 11px;
}

.immersive :is(#list-panel, #inspector) .panel-head {
  border-bottom: 1px solid #af967488;
  background: linear-gradient(105deg, #e9dcc5, #f2e7d2);
}
.immersive .panel-head :is(h2, h3) { margin: 0; font: 400 20px/1.15 var(--serif); }

.immersive .panel-head :is(.close-dossier, .dossier-back) {
  display: grid;
  flex: none;
  place-items: center;
  width: 35px;
  height: 35px;
  padding: 0;
  border: 1px solid #9e836580;
  background: transparent;
  color: var(--ink);
  font: 23px/1 var(--serif);
}

.immersive .panel-head :is(.close-dossier, .dossier-back):hover { color: var(--oxide); border-color: var(--oxide); }
.immersive #inspector .rail-head { justify-content: flex-start; }
.immersive #inspector-title { font: 600 12px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.immersive .panel-head .dossier-back { font: 19px/1 var(--sans); }

.immersive :is(#catalog-content, #detail) {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px 13px;
  scrollbar-gutter: stable;
}

.immersive #catalog-content { scrollbar-color: #aa9274 var(--paper); }
.immersive .list-entry { border-bottom-color: #bdb19b80; }
.immersive .list-entry:is(:hover,[aria-current=true]) { background: #eadcc4; border-color: #ad8a68; }
.immersive .list-entry b { color: var(--oxide); }
.immersive :is(.list-top,.list-entry small,.list-nav) { color: var(--muted); }
.immersive .list-nav .small-action { border-color: var(--line); background: var(--paper); color: var(--ink); }
.immersive #inspector .intro-grid { display: block; }
.immersive :is(.hits, .filter-inner) :focus-visible { outline-color: var(--oxide); }

.immersive #method .hero-about {
  min-height: 190px;
  margin: 11px 0 15px;
  padding: 22px clamp(17px, 4vw, 34px);
}

.immersive #method .hero-about h2 {
  max-width: 8ch;
  margin: 7px 0 12px;
  color: var(--ivory);
  font: 400 clamp(37px, 7vw, 55px)/.86 var(--serif);
  letter-spacing: -.065em;
  text-shadow: 0 1px 15px #101211;
}

.immersive #method .hero-about h2 em { color: #e4c8a0; font-weight: inherit; }
.immersive #method .hero-about .eyebrow { color: var(--copper); }
.immersive #method .hero-about p { color: #ebdfcd; }
.immersive #method .hero-stats { flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line); }

@media (max-width: 760px) {
  body.immersive { --screen-gap: 9px; --chart-bar-height: 48px; }
  .immersive .map-brand small { display: none; }
  .immersive .map-bar { gap: 6px; }
  .immersive .map-tabs button,
  .immersive .filters summary,
  .immersive :is(#open-trails, #open-method, #toggle-fullscreen) { padding-inline: 5px; }
  .immersive .map-brand { gap: 4px; font-size: 17px; }
  .immersive .map-brand .brandmark { width: 21px; height: 21px; }
  .immersive .map-guide-text { display: none; }
  .immersive #list-panel { width: min(38vw, 330px); }
  .immersive #inspector { width: clamp(290px, 46vw, 365px); }
}

@media (max-width: 560px) {
  body.immersive { --chart-bar-height: 82px; --chrome-bottom: calc(var(--safe-bottom) + 8px); }

  .immersive .map-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 37px 43px;
    row-gap: 0;
  }

  .immersive .find-group { grid-column: 1 / -1; gap: 3px; }
  .immersive .map-brand { min-width: 0; justify-self: start; font-size: 18px; }
  .immersive .map-tabs { justify-self: end; }
  .immersive .search-group { position: static; flex: 1 1 auto; }
  .immersive .search-box { gap: 5px; padding-inline: 6px; }
  .immersive .search-box kbd { display: none; }
  .immersive .hits { left: var(--screen-gap); right: var(--screen-gap); width: auto; }
  .immersive .filters { position: static; }
  .immersive .filter-inner { left: auto; right: var(--screen-gap); }

  .immersive :is(#list-panel, #inspector) {
    top: auto;
    left: calc(var(--safe-left) + var(--screen-gap));
    right: calc(var(--safe-right) + var(--screen-gap));
    width: auto;
    height: min(72dvh, calc(100dvh - var(--chrome-top) - 2 * var(--screen-gap) - var(--safe-bottom)));
  }

  .immersive .map-meta { bottom: calc(var(--safe-bottom) + 47px); }
  .immersive .map-foot { gap: 4px; max-width: none; bottom: calc(var(--safe-bottom) + 47px); }
  .immersive .map-meta { bottom: calc(var(--safe-bottom) + 81px); }
  #zoom-value { min-width: 44px; }
}

@media (max-width: 370px) {
  .immersive .map-brand { font-size: 16px; }
  .immersive .find-group { gap: 1px; }
  .immersive .search-group { min-width: 64px; }
  .immersive .map-foot { font-size: 8px; padding-inline: 5px; }
  .immersive #sector-strip { gap: 3px; padding-inline: 5px; }
  .immersive #sector-list > span,
  .immersive #sector-info > span { display: none; }
}

@media (pointer: coarse) {
  .immersive .map-bar :is(#open-trails, #open-method, #toggle-fullscreen) { min-height: 40px; }
}

/* The map is the interface. Only the search trigger sits above it by default. */
body.immersive.minimal-map {
  --chart-bar-height: 0px;
  --chrome-bottom: calc(var(--safe-bottom) + 79px);
}
body.immersive.minimal-map:has(#sector-strip:not([hidden])) { --sector-height: 0px; }
.minimal-map #map:focus-visible { outline: 1px solid #94e6ff45; outline-offset: -2px; }
.minimal-map #tip {
  --tip-ink:#a4f1ff;
  max-width:min(310px,76%);
  padding:9px 12px 10px;
  color:#eff6ff;
  background:linear-gradient(146deg,#162a40,#0b1625 72%);
  border:1px solid color-mix(in srgb,var(--tip-ink) 35%,#263d55);
  border-inline-start:2px solid var(--tip-ink);
  border-radius:8px;
  box-shadow:0 12px 30px #0009;
  font:550 13px/1.4 var(--sans);
  overflow-wrap:anywhere;
}
.minimal-map #tip small {
  margin-bottom:4px;
  color:var(--tip-ink);
  font:600 10px/1.3 var(--mono);
  text-transform:uppercase;
  letter-spacing:.05em;
}
.minimal-map #tip.relation-tip {
  max-width:min(332px,80%);
  font-weight:400;
  line-height:1.5;
}
.search-fab {
  position: fixed;
  z-index: 55;
  right: calc(env(safe-area-inset-right, 0px) + clamp(13px, 2.1vw, 28px));
  bottom: calc(env(safe-area-inset-bottom, 0px) + clamp(13px, 2.1vw, 28px));
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid #6387a7;
  border-radius: 50%;
  color: #d8f4ff;
  background: radial-gradient(circle at 32% 17%, #203e59, #101f34 62%, #091426);
  box-shadow: 0 9px 27px #02050fc9, 0 0 0 4px #83bbed13, inset 0 1px #c3ebff57;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
.search-fab:hover { background: #213e59; border-color: #b7e5ff; box-shadow: 0 9px 27px #02050fc9, 0 0 0 4px #83bbed2a; }
.search-fab:focus-visible { outline-color: #b7e5ff; }
@media (prefers-reduced-motion: reduce) { .search-fab { transition: none; } }
#search-dialog {
  --palette-pad: clamp(14px, 2.1vw, 21px);
  --palette-border: #354d5d;
  --palette-text: #edf6fa;
  --palette-muted: #adc1ce;
  --palette-light: #9aeadf;
  --palette-field: #09131c;
  --palette-hover: #1a303a;
  color-scheme: dark;
  position: fixed;
  inset: auto max(14px, env(safe-area-inset-right, 0px)) max(14px, env(safe-area-inset-bottom, 0px)) auto;
  margin: 0;
  box-sizing: border-box;
  width: min(568px, calc(100vw - 28px));
  max-width: none;
  max-height: min(780px, calc(100dvh - 28px));
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-block-start: 133px;
  scrollbar-color: #526b7a #101b24;
  padding: 0 var(--palette-pad) var(--palette-pad);
  border: 1px solid #466273;
  border-radius: 19px;
  color: var(--palette-text);
  font-family: var(--sans);
  background: #0d1721;
  box-shadow: inset 0 1px #c5e2ff32, 0 24px 70px #02050ed0;
}
#search-dialog::backdrop { background: #05091268; backdrop-filter: blur(2px); }
.palette-command {
  position: sticky;
  z-index: 2;
  top: 0;
  margin: 0 calc(-1 * var(--palette-pad));
  padding: var(--palette-pad) var(--palette-pad) 12px;
  border-bottom: 1px solid #263b47;
  background:
    radial-gradient(ellipse at 10% 0, #1b353d, transparent 67%),
    linear-gradient(151deg, #132430, #0d1721 80%);
  box-shadow: 0 9px 18px #07101855;
}
.palette-header { display: flex; align-items: center; gap: 14px; margin-bottom: 13px; }
.palette-header form { margin-left: auto; align-self: start; }
#search-dialog .eyebrow {
  color: var(--palette-light);
  font: 600 10px/1.2 var(--mono);
  letter-spacing: .16em;
}
#search-dialog h2 {
  margin: 4px 0 0;
  color: var(--palette-text);
  font: 700 clamp(23px, 5vw, 33px)/1 var(--sans);
  letter-spacing: -.035em;
}
.palette-emblem, .palette-close {
  display: grid;
  flex: none;
  place-items: center;
  border: 1px solid var(--palette-border);
  color: var(--palette-light);
  background: #11232b;
}
.palette-emblem {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: radial-gradient(circle at 35% 24%, #254d55, #11232b 73%);
  box-shadow: inset 0 0 0 3px #92e5d611, inset 0 1px #a8e6ff47;
}
.palette-close { width: 38px; height: 38px; padding: 0; border-radius: 10px; }
.palette-close:hover { border-color: var(--palette-light); background: var(--palette-hover); }
#search-dialog :focus-visible { outline-color: var(--palette-light); }
#search-dialog[open] { animation: surface-in 170ms ease-out; }
.palette-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 0 14px;
  min-height: 52px;
  background: var(--palette-field);
  border: 1px solid var(--palette-border);
  border-radius: 12px;
}
.palette-field:focus-within { border-color: #76c7bf; box-shadow: 0 0 0 3px #91ffe619; }
.palette-field .search-icon { flex: none; width: 14px; height: 14px; border-color: var(--palette-light); }
.palette-field .search-icon::after { top: 11px; left: 10px; background: var(--palette-light); }
.palette-field input {
  width: 100%;
  min-width: 0;
  padding: 10px 0;
  background: none;
  border: none;
  color: var(--palette-text);
  font-size: 17px;
  caret-color: var(--palette-light);
}
.palette-field input:focus { outline: none; }
.palette-field input::placeholder { color: var(--palette-muted); }
.palette-field input::-webkit-search-cancel-button { display: none; }
.palette-query-clear {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--palette-muted);
  background: none;
}
.palette-query-clear:hover { color: var(--palette-text); background: var(--palette-hover); border-color: var(--palette-border); }
.palette-field kbd {
  flex: none;
  padding: 3px 7px;
  border: 1px solid var(--palette-border);
  border-radius: 4px;
  background: #172930;
  color: var(--palette-light);
  font: 14px var(--mono);
}
.palette-examples, .palette-active { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 0; color: var(--palette-muted); font-size: 12px; }
.palette-examples button, .palette-active button {
  min-height: 33px;
  padding: 4px 10px;
  border: 1px solid var(--palette-border);
  border-radius: 8px;
  background: #12232e;
  color: var(--palette-text);
  font: inherit;
}
.palette-active button {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  border-color: #466e72; background: #152a30; color: var(--palette-light); text-align: left;
}
.palette-active button span { min-width: 0; overflow-wrap: anywhere; }
.palette-active button b { color: var(--palette-muted); font: 600 15px/1 var(--mono); }
.palette-examples button:hover, .palette-active button:hover { border-color: var(--palette-light); background: var(--palette-hover); }
.palette-results {
  margin-top: 12px;
  border: 1px solid #2f4554;
  border-radius: 12px;
  background: #101d27;
}
#search-dialog[data-search-state=empty] .palette-results {
  border-style: dashed;
  border-color: #526779;
}
.palette-hits {
  display: grid;
  gap: 3px;
  padding: 5px;
  max-height: min(44dvh, 410px);
  overflow: auto;
  scrollbar-color: #526b7a #101b24;
  border-bottom: 1px solid #2f4554;
  border-radius: 11px 11px 0 0;
  background: #0a131c;
}
#search-dialog:has(.palette-filters[open]) .palette-hits { max-height: clamp(92px, 21dvh, 182px); }
.palette-hit {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 26px;
  align-items: center;
  width: 100%;
  min-height: 82px;
  gap: 11px;
  padding: 9px 10px;
  text-align: left;
  color: var(--palette-text);
  background: #111f2b;
  border: 1px solid transparent;
  border-radius: 8px;
}
.palette-hit:hover { background: var(--palette-hover); border-color: #4e6a7a; }
.palette-hit[aria-selected=true] {
  background: linear-gradient(110deg, color-mix(in srgb, var(--hit-accent) 15%, #14232f), #162732 85%);
  border-color: color-mix(in srgb, var(--hit-accent) 51%, #243746);
  box-shadow: inset 3px 0 var(--hit-accent);
}
.hit-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--hit-accent) 36%, #1b293c);
  border-radius: 7px;
  color: var(--hit-accent);
  background: radial-gradient(ellipse, color-mix(in srgb, var(--hit-accent) 15%, #162438), #0c1727);
}
.hit-thumb svg { width: 93%; }
.hit-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0c1727;
  opacity: 0;
}
.palette-hit.has-thumbnail .hit-thumb img { opacity: 1; }
.palette-hit.has-thumbnail :is(.hit-illustration-label,.hit-thumb svg) { display: none; }
.hit-copy { display: grid; gap: 4px; min-width: 0; }
.hit-copy strong { font: 600 15px/1.2 var(--sans); overflow-wrap: anywhere; }
.hit-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 7px;
  color: var(--palette-muted);
  font: 500 11px/1.25 var(--sans);
}
.hit-illustration-label { padding-left: 6px; border-left: 1px solid var(--palette-border); }
.hit-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: #c6d4e3;
  font: 400 12px/1.35 var(--sans);
  overflow-wrap: anywhere;
}
.hit-code, .hit-arrow { color: var(--hit-accent); font: 600 11px/1.2 var(--mono); }
.hit-code {
  padding: 2px 4px;
  border: 1px solid color-mix(in srgb, var(--hit-accent) 29%, transparent);
  border-radius: 5px;
  background: color-mix(in srgb, var(--hit-accent) 9%, #121d2f);
  white-space: nowrap;
}
.hit-arrow {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 15px;
}
.palette-hit:is(:hover,[aria-selected=true]) .hit-arrow { background: color-mix(in srgb, var(--hit-accent) 12%, transparent); }
.palette-footer { display: flex; justify-content: space-between; align-items: center; gap: 9px; padding: 8px 9px 8px 11px; }
.palette-footer > div { flex: 1; min-width: 0; }
.search-pages { display: flex; gap: 4px; }
.search-pages button { min-width: 34px; padding-inline: 6px; font-size: 16px; }
#search-dialog .search-pages button:disabled { opacity: .42; cursor: default; }
#search-message { margin: 0; color: var(--palette-muted); font-size: 12px; line-height: 1.45; }
.palette-actions, .palette-sector { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 10px 10px; }
.palette-tools > .palette-actions:first-of-type { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.palette-tools > .palette-actions:first-of-type button { white-space: normal; }
.palette-zoom {
  justify-content: space-between;
  padding: 6px;
  border: 1px solid var(--palette-border);
  border-radius: 8px;
  background: var(--palette-field);
}
.palette-zoom-label { margin-right: auto; padding-left: 4px; color: var(--palette-muted); font-size: 12px; font-weight: 600; }
#search-dialog .small-action {
  min-height: 34px;
  border-color: var(--palette-border);
  border-radius: 7px;
  background: var(--palette-field);
  color: var(--palette-text);
}
#search-dialog .small-action:is(:hover,[aria-pressed=true]) { border-color: #76c7bf; background: var(--palette-hover); }
#search-dialog #zoom-fit {
  display: inline-flex; flex: none; align-items: center; justify-content: center;
  gap: 5px; padding-inline: 9px; color: var(--palette-light);
}
#search-dialog #zoom-value { min-height: 30px; background: var(--palette-field); color: var(--palette-text); }
#search-dialog #sector-strip { position: static; display: flex; height: auto; padding: 7px; background: var(--palette-field); border: 0; }
#search-dialog #sector-title { width: 100%; text-align: left; color: var(--palette-text); }
.palette-tools, .palette-filters {
  border: 1px solid var(--palette-border);
  border-radius: 11px;
  background: #101e28;
}
.palette-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr); gap: 7px; margin-top: 8px; }
.palette-controls:has(details[open]) { grid-template-columns: minmax(0, 1fr); }
.palette-tools summary, .palette-filters summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 39px;
  padding: 6px 11px;
  border-radius: 9px;
  color: var(--palette-text);
  font-size: 13px;
  font-weight: 600;
  list-style: none;
}
.palette-tools summary::-webkit-details-marker, .palette-filters summary::-webkit-details-marker { display: none; }
.palette-tools summary > svg, .palette-filters summary > svg { flex: none; color: var(--palette-light); }
.palette-tools summary::after, .palette-filters summary::after {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin: 0 2px 0 auto;
  border: solid var(--palette-light);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg) translateY(-2px);
}
.palette-tools summary:hover, .palette-filters summary:hover { background: var(--palette-hover); }
.palette-tools[open] summary, .palette-filters[open] summary { margin-bottom: 10px; border-bottom: 1px solid var(--palette-border); border-radius: 9px 9px 0 0; }
.palette-tools[open] summary::after, .palette-filters[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.palette-filters:has(#filter-count:not([hidden])) { border-color: #76b4dc; }
#filter-count {
  width: auto;
  height: auto;
  min-width: 22px;
  padding: 3px 6px;
  border-radius: 10px;
  background: var(--palette-light);
  color: #0c2136;
  font: 600 11px/1.1 var(--mono);
}
.palette-filters > :not(summary) { margin-inline: 11px; }
.palette-facet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; }
.palette-facet-grid > div { min-width: 0; }
.palette-facet-meta { display: flex; align-items: center; gap: 9px; }
#filter-context { flex: 1; margin: 0; color: var(--palette-muted); font-size: 12px; line-height: 1.4; }
#filter-suggestions {
  display: grid;
  gap: 6px;
  margin-block: 8px 12px;
  padding: 8px 9px;
  border: 1px solid #395a78;
  border-radius: 8px;
  background: #16283f;
  color: var(--palette-light);
  font: 600 11px/1.35 var(--mono);
}
#suggested-zones { display: flex; flex-wrap: wrap; gap: 5px; }
#suggested-zones button { font-family: var(--sans); }
.palette-filters label, .palette-filters .zone-head { color: var(--palette-muted); font-weight: 600; }
.palette-filters .zone-head { border-color: var(--palette-border); }
.palette-filters select {
  width: 100%;
  min-height: 37px;
  padding: 4px 9px;
  border: 1px solid var(--palette-border);
  border-radius: 7px;
  background: var(--palette-field);
  color: var(--palette-text);
  font-size: 14px;
  text-overflow: ellipsis;
}
.palette-filters .zones {
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px;
  max-height: min(36dvh, 260px); overflow: auto;
  padding: 3px 3px 4px; margin-bottom: 9px;
  scrollbar-color: #526b7a #101b24;
}
.palette-filters .zone {
  grid-template-columns: 18px minmax(0, 1fr) auto;
  min-height: 36px;
  padding-inline: 7px;
  color: var(--palette-text);
  border-color: var(--palette-border);
  border-radius: 6px;
  background: var(--palette-field);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.palette-filters .zone span, .palette-filters .reset { color: var(--palette-light); }
.palette-filters .zone:is(:hover,[aria-pressed=true]):not(:disabled) { background: var(--palette-hover); border-color: #76c7bf; }
.palette-filters .zone:disabled { opacity: .55; cursor: default; }
.palette-filters .reset { flex: none; min-height: 34px; padding: 2px 0; text-decoration: underline; text-underline-offset: 3px; }
#search-clear-filters { min-height: 33px; padding: 3px 0; color: var(--palette-light); text-align: left; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 500px) {
  #search-dialog {
    right: max(8px, env(safe-area-inset-right, 0px));
    bottom: max(8px, env(safe-area-inset-bottom, 0px));
    width: calc(100% - 16px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    border-radius: 16px;
    scroll-padding-block-start: 117px;
  }
  .palette-header { gap: 10px; margin-bottom: 10px; }
  .palette-emblem { width: 42px; height: 42px; }
  .palette-field { gap: 10px; padding-inline: 11px; }
  .palette-hit { grid-template-columns: 47px minmax(0, 1fr) 16px; gap: 8px; padding-inline: 7px; }
  .hit-copy strong { font-size: 14px; }
  .hit-arrow { width: 16px; height: 24px; }
  .palette-footer:has(.search-pages:not([hidden])) { display: grid; grid-template-columns: 1fr auto; }
  .palette-footer:has(.search-pages:not([hidden])) > div { grid-column: 1/-1; }
  .palette-controls { grid-template-columns: minmax(0, .7fr) minmax(0, 1fr); }
}
@media (max-width: 360px) {
  .palette-tools summary, .palette-filters summary { font-size: 12px; padding-inline: 8px; gap: 5px; }
  .palette-filters .zones { grid-template-columns: minmax(0, 1fr); }
}
@media (max-height: 520px) {
  #search-dialog { scroll-padding-block-start: 104px; }
  .palette-command { padding-block: 8px; }
  .palette-header { margin-bottom: 7px; }
  .palette-emblem { width: 38px; height: 38px; }
  .palette-field { min-height: 44px; }
}
@media (pointer: coarse) {
  .palette-close { width: 44px; height: 44px; }
  .palette-query-clear { width: 44px; height: 44px; margin-right: -6px; }
  .palette-field kbd { display: none; }
  .palette-tools summary, .palette-filters summary, .palette-filters .zone, .palette-filters select { min-height: 44px; }
  .palette-filters select { font-size: 16px; }
  .palette-examples button, .palette-active button, #search-dialog .small-action, .palette-filters .reset { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  #search-dialog[open] { animation: none; }
}
.path-project { margin-bottom: .5rem; }
.dossier-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 7px 10px 0;
  background: #e9dcc5;
  border-bottom: 1px solid #bca385;
}
.dossier-tabs button {
  position: relative;
  bottom: -1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 41px;
  padding: 4px 2px;
  border: 1px solid #bba385;
  border-radius: 4px 4px 0 0;
  background: #e0d0b5;
  color: #514131;
  font: 600 12px/1.25 var(--sans);
}
.dossier-tabs button:hover { background: #efe3cd; }
.dossier-tabs button[aria-selected=true] {
  border-top: 2px solid var(--oxide);
  border-bottom-color: var(--paper-light);
  background: var(--paper-light);
  color: var(--oxide);
}
.dossier-tabs button:focus-visible { outline-offset: -4px; }
.dossier-tabs span {
  padding: 2px 4px;
  background: #5f43201a;
  border-radius: 2px;
  font: 10px/1 var(--mono);
}
.immersive #detail { padding: 12px clamp(12px, 1.5vw, 22px) 20px; }
.dossier-heading {
  padding: 13px 12px 11px 14px;
  margin-bottom: 13px;
  border: 1px solid #b89d7f80;
  border-left: 3px solid color-mix(in srgb, var(--dossier-ink) 58%, #605443);
  background: linear-gradient(120deg, #eee1cb, #f9f2e4 86%);
}
.detail .dossier-heading h3 {
  margin: 2px 0 8px;
  color: #281e16;
  font: 400 clamp(29px, 3vw, 39px)/1.02 var(--serif);
  letter-spacing: -.03em;
  overflow-wrap: anywhere;
}
.detail .dossier-aliases { margin: 0 0 8px; font-size: 12px; }
.dossier-heading .status {
  margin: 0;
  padding: 4px 6px;
  border-color: #a26b54;
  background: #f7ecd9;
  color: #762c1b;
  font-weight: 600;
  text-transform: uppercase;
}
.dossier-heading .status::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border: 1px solid #7d624b80;
  border-radius: 50%;
  background: var(--st);
}
.dossier-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.dossier-actions .small-action { min-height: 33px; padding-inline: 8px; margin: 0; }
.dossier-section p { color: #41392d; font-size: 14px; line-height: 1.55; }
.dossier-section > .section-label:first-child { margin-top: 0; }
.dossier-section .section-label { font-size: 11px; }
.dossier-section:focus-visible { outline-offset: 3px; }
.research .research-summary { padding: 11px 12px; margin: 0 0 12px; background: #e9e8d9; }
.research .research-summary p { font-size: 14px; }
.dossier-section .research-findings li { padding: 10px 0; }
.dossier-section .research-findings h4 { margin: 0 0 4px; font-size: 17px; }
.dossier-section .dossier-plate { margin: 12px 0; padding: 6px; background: #e9dcc5; }
.dossier-section .dossier-plate :is(img,svg) { background: #25221d; }
.dossier-section .dossier-plate img { max-height: 230px; }
.dossier-section .dossier-plate figcaption { padding: 7px 3px 2px; color: #574631; font-size: 11px; }
.dossier-section .dossier-plate figcaption::before {
  content: '01 / ';
  color: var(--oxide);
  font: 600 11px var(--mono);
}
.dossier-section .dossier-plate figcaption a { color: var(--oxide); }
.dossier-original { border-block: 1px solid #bba38580; }
.dossier-original summary { padding: 10px 2px; color: var(--oxide); font-size: 13px; cursor: pointer; }
.dossier-section .connection-box {
  margin-bottom: 7px;
  padding: 7px 9px 8px;
  border-left: 3px solid color-mix(in srgb, var(--dossier-ink) 54%, #685947);
  background: #f4ebda;
}
.dossier-section .connection {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 2px 3px 4px;
  color: var(--ink);
  font: 600 17px/1.25 var(--serif);
}
.dossier-section .connection b { grid-column: 1 / -1; font-size: 10px; }
.dossier-section .connection span { padding-left: 7px; color: var(--oxide); font: 15px var(--sans); }
.dossier-section .connection:hover { background: #ead9bc; }
.dossier-section .connection-box :is(p,a) { margin: 2px 3px; font-size: 13px; }
.dossier-source-list { gap: 0; }
.dossier-source-list li { display: grid; grid-template-columns: 25px 1fr; gap: 7px; align-items: start; padding: 8px 0; border-bottom: 1px solid #ad927480; }
.dossier-source-list li span { padding: 3px 0; background: #e9dbc2; color: var(--oxide); text-align: center; font: 11px var(--mono); }
.dossier-source-list li a, .dossier-section .context-sources { font-size: 13px; line-height: 1.4; }
.dossier-section .research-leads { margin-top: 13px; }
.dossier-section .research-leads p { font-size: 13px; }
@media (pointer: coarse) {
  :is(#inspector,#list-panel,#search-dialog,#open-search) { -webkit-tap-highlight-color: #9340272b; }
  .immersive .panel-head :is(.close-dossier,.dossier-back) { width: 40px; height: 40px; }
  .dossier-tabs button, .dossier-actions .small-action { min-height: 44px; }
  #search-dialog .palette-field kbd { display: none; }
  #search-dialog #zoom-fit { min-height: 42px; }
}
#path-trace {
  position: fixed;
  z-index: 22;
  top: max(12px, env(safe-area-inset-top, 0px));
  left: max(12px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  width: min(348px, calc(100vw - 24px));
  max-height: min(45dvh, 280px);
  overflow: auto;
  padding: 11px 13px 12px;
  background: linear-gradient(130deg, #f8f0e0, #eee2cd);
  color: var(--ink);
  border: 1px solid #ad9274;
  border-top: 3px solid var(--oxide);
  box-shadow: 0 8px 25px #0008;
  color-scheme: light;
}
.trace-header, .trace-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.trace-header span { color: var(--oxide); font: 11px var(--mono); text-transform: uppercase; letter-spacing: .075em; }
#path-trace button { padding: 6px 9px; border: 1px solid #ae9372; color: var(--ink); background: #f7eedc; font-size: 12px; }
#path-trace button:hover:not(:disabled) { border-color: var(--oxide); background: #ead8bb; }
#path-trace button:disabled { opacity: .42; }
#path-trace #trace-close { padding: 0 7px; font-size: 20px; line-height: 1.2; }
#trace-title { margin: 5px 0; color: var(--ink); font: 400 17px/1.25 var(--serif); }
#trace-title span { color: var(--oxide); }
#trace-content p { margin: 4px 0; color: var(--muted); font-size: 12px; line-height: 1.35; }
#trace-content .trace-type { color: var(--oxide); font-weight: 600; }
#trace-content a { color: var(--oxide); font-size: 12px; }
.trace-actions { margin-top: 9px; }

/* Controls that sit above the chart share its dark instruments. */
body.immersive {
  --console-ground:#101c27;
  --console-bar:#172734;
  --console-well:#0a141e;
  --console-raised:#203543;
  --console-line:#385465;
  --console-text:#edf5f8;
  --console-muted:#aec3cf;
  --console-accent:#a0ebdf;
}

.surface-label {
  display:block; color:var(--console-accent);
  font:650 10px/1.35 var(--mono); letter-spacing:.115em; text-transform:uppercase;
}
.search-fab {
  border-color:#73a7aa; color:#e0fff8;
  background:radial-gradient(circle at 30% 12%,#2b5360,#142b37 65%,#0a1723);
  box-shadow:0 10px 30px #02060bc4,0 0 0 4px #a0ebdf14,inset 0 1px #e0fff84a;
}
.search-fab:hover { border-color:var(--console-accent); background:#244856; box-shadow:0 10px 30px #02060bc4,0 0 0 4px #a0ebdf2b; }
.search-fab:focus-visible { outline-color:var(--console-accent); }

.immersive :is(#list-panel,#inspector:not(:modal),#empty-map),
:is(.console-dialog,#path-trace) {
  color-scheme:dark;
  color:var(--console-text); border:1px solid var(--console-line);
  border-radius:15px; background:var(--console-ground);
  box-shadow:0 17px 46px #02070bbb,inset 0 1px #e6ffff17;
}
:is(#list-panel,#inspector:not(:modal),#empty-map,.console-dialog,#path-trace) :focus-visible {
  outline-color:var(--console-accent); outline-offset:2px;
}
:is(#list-panel,#inspector:not(:modal),#empty-map,.console-dialog,#path-trace) :is(.small-action,.close-dossier,#trace-close,.trace-actions button) {
  min-height:39px; margin:0; padding:5px 10px;
  border:1px solid var(--console-line); border-radius:7px;
  color:var(--console-text); background:var(--console-well);
  font:650 12px/1.25 var(--sans);
}
:is(#list-panel,#inspector:not(:modal),#empty-map,.console-dialog,#path-trace) :is(.small-action,.close-dossier,#trace-close,.trace-actions button):hover:not(:disabled) {
  border-color:#83c4c3; color:var(--console-accent); background:var(--console-raised);
}
:is(#list-panel,#inspector:not(:modal),.console-dialog,#path-trace) :is(.close-dossier,#trace-close) {
  display:grid; place-items:center; flex:none; width:42px; min-height:42px;
  padding:0; color:var(--console-muted); font:400 24px/1 var(--sans);
}
.immersive #empty-map {
  display:grid; justify-items:center; gap:8px; padding:15px;
  pointer-events:auto;
}
#empty-map strong { font:600 16px/1.3 var(--sans); }

.immersive #list-panel {
  width:clamp(300px,30vw,460px);
  max-height:min(770px,calc(100dvh - 96px));
}
.immersive #list-panel .panel-head,
.immersive #inspector:not(:modal) .rail-head {
  flex-basis:64px; padding-inline:15px; border-bottom:1px solid var(--console-line);
  background:linear-gradient(120deg,#1c3442,#142330 74%);
}
.immersive #list-panel .panel-head h2,
.immersive #inspector:not(:modal) #inspector-title {
  margin:3px 0 0; color:var(--console-text);
  font:680 clamp(17px,2.2vw,23px)/1.13 var(--sans); letter-spacing:-.032em; text-transform:none;
}
#list-panel .catalog-bar {
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  padding:5px 13px; border-bottom:1px solid var(--console-line); background:var(--console-ground);
}
#list-panel .list-top { margin:0; color:var(--console-muted); font:550 11px/1.35 var(--mono); }
#list-panel .catalog-bar .small-action { min-height:34px; color:var(--console-accent); }
.immersive #catalog-content { padding:4px 7px 8px; scrollbar-color:#527181 var(--console-well); }
.immersive #list-panel .list-entry {
  display:grid; grid-template-columns:49px minmax(0,1fr) auto;
  gap:8px; align-items:center; min-height:54px; padding:7px 7px 7px 5px;
  border:1px solid transparent; border-bottom-color:#294251; border-radius:7px;
  color:var(--console-text); text-align:left;
}
.immersive #list-panel .list-entry:is(:hover,[aria-current=true]) {
  border-color:color-mix(in srgb,var(--entry-ink) 50%,var(--console-line)); background:#1b2e3c;
}
#list-panel .list-entry b {
  padding:4px 3px; border:1px solid color-mix(in srgb,var(--entry-ink) 45%,var(--console-line)); border-radius:4px;
  background:color-mix(in srgb,var(--entry-ink) 9%,var(--console-well));
  color:var(--entry-ink); text-align:center; font:650 10px/1.2 var(--mono);
}
.list-entry-copy { display:grid; gap:4px; min-width:0; overflow-wrap:anywhere; }
.list-entry-copy strong { font:620 14px/1.3 var(--sans); }
#list-panel .list-entry small {
  display:flex; flex-wrap:wrap; align-items:center; gap:2px 9px;
  color:var(--console-muted); font:10px/1.3 var(--sans); text-align:left; grid-column:auto;
}
.entry-status::before {
  content:""; display:inline-block; width:5px; height:5px; margin-right:4px; vertical-align:2px;
  border-radius:50%; background:color-mix(in srgb,var(--entry-status) 66%,#efffff);
}
.entry-arrow { color:var(--console-accent); font-size:14px; }
#list-panel .list-nav {
  gap:7px; padding:6px 11px; border-top:1px solid var(--console-line);
  color:var(--console-muted); background:var(--console-bar); font:650 11px var(--mono);
}
#list-panel .list-nav .small-action { background:var(--console-well); color:var(--console-text); border-color:var(--console-line); }

.immersive #inspector:not(:modal) {
  max-height:min(720px,calc(100dvh - 95px));
}
#inspector:not(:modal) .archive-kicker { display:block; color:var(--console-accent); font:650 9px/1.25 var(--mono); letter-spacing:.07em; text-transform:uppercase; }
.immersive #inspector:not(:modal) #detail { padding:12px; scrollbar-color:#527181 var(--console-well); }
#inspector:not(:modal) .overview-lead {
  --sector-ink:var(--console-accent);
  padding:13px; border:1px solid var(--console-line); border-radius:10px;
  background:radial-gradient(ellipse at top right,color-mix(in srgb,var(--sector-ink) 15%,transparent),transparent 67%),var(--console-well);
}
#inspector:not(:modal) .overview-lead .surface-label { color:var(--sector-ink); }
#inspector:not(:modal) .overview-lead h3 {
  margin:5px 0; color:var(--console-text); font:675 clamp(22px,3.4vw,32px)/1.08 var(--sans); letter-spacing:-.035em;
}
#inspector:not(:modal) #detail p { margin:4px 0 1px; color:var(--console-muted); font-size:13px; }
#inspector:not(:modal) .sector-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; margin:11px 0 0; }
#inspector:not(:modal) .sector-stats div { padding:5px 4px; border-top:1px solid var(--console-line); }
#inspector:not(:modal) .sector-stats dt { color:var(--console-muted); font:10px/1.3 var(--mono); }
#inspector:not(:modal) .sector-stats dd { margin:3px 0 0; color:var(--console-text); font:650 17px/1.1 var(--sans); }
#inspector:not(:modal) .sector-stats small { color:var(--console-muted); font-size:10px; }
#inspector:not(:modal) #detail .section-label { margin:12px 0 5px; color:var(--console-accent); }
#inspector:not(:modal) :is(.route-card,.featured) {
  display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:7px;
  min-height:43px; margin-bottom:3px; padding:7px; border:1px solid #2d4352; border-radius:7px;
  color:var(--console-text); background:#142331; font:570 13px/1.25 var(--sans);
}
#inspector:not(:modal) :is(.route-card,.featured):hover { border-color:#78b9ba; background:var(--console-raised); }
#inspector:not(:modal) :is(.route-card,.featured) :is(b,i) { color:var(--console-accent); font:650 11px/1.2 var(--mono); }
#inspector:not(:modal) .route-card strong { font-weight:650; }
#inspector:not(:modal) .route-card small { display:block; margin-top:3px; color:var(--console-muted); font:10px/1.3 var(--mono); }
#inspector:not(:modal) .overview-actions { display:flex; gap:5px; flex-wrap:wrap; margin-top:10px; }

.console-dialog {
  --dialog-gutter:clamp(13px,2.6vw,26px);
  position:fixed; inset:0; width:min(688px,calc(100vw - 20px)); max-width:none;
  max-height:calc(100dvh - max(12px,var(--safe-top)) - max(12px,var(--safe-bottom)));
  padding:0 var(--dialog-gutter) var(--dialog-gutter);
  overscroll-behavior:contain; scrollbar-color:#527181 var(--console-well);
}
.console-dialog::backdrop { background:#040a11bb; }
.console-dialog .dialog-top {
  position:sticky; top:0; z-index:2; min-height:51px; margin:0 calc(-1 * var(--dialog-gutter)) 13px;
  padding:4px var(--dialog-gutter); border-bottom:1px solid var(--console-line); background:var(--console-bar);
}
.console-dialog h2 { margin:0 0 11px; color:var(--console-text); font:710 clamp(23px,4vw,38px)/1.08 var(--sans); letter-spacing:-.045em; }
.console-dialog h3 { color:var(--console-text); font:660 17px/1.25 var(--sans); }
.console-dialog :is(p,dl,small) { color:var(--console-muted); }
.console-dialog a { color:var(--console-accent); }
.console-empty { margin:10px 0; padding:11px; border:1px dashed var(--console-line); border-radius:8px; color:var(--console-muted); }

.immersive #method .hero-about {
  margin-top:0; border:1px solid var(--console-line); border-radius:10px; overflow:hidden;
  background-color:var(--console-well);
}
.immersive #method .hero-about h2 { max-width:none; font-size:clamp(37px,7.3vw,69px); }
.immersive #method .hero-stats {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px;
  padding:0; border:0; background:none;
}
#method .hero-stat {
  display:grid; align-content:start; gap:3px; min-width:0; padding:9px;
  border:1px solid var(--console-line); border-radius:8px; background:var(--console-well);
  white-space:normal;
}
#method .hero-stat strong { color:var(--console-text); font:650 clamp(18px,4.2vw,28px)/1.1 var(--sans); }
#method .hero-stat small { color:var(--console-muted); font:600 10px/1.25 var(--sans); }
.method-guide { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:10px 0; }
.method-guide section,.method-legend { padding:10px 12px; border:1px solid var(--console-line); border-radius:8px; background:var(--console-well); }
.method-guide h3 { margin:0 0 4px; }
.method-guide p:last-child { margin-bottom:0; }
.method-guide kbd { padding:2px 4px; border:1px solid var(--console-line); border-radius:4px; color:var(--console-accent); background:var(--console-bar); }
.method-legend { margin-block:7px; }
.method-legend summary { padding:3px 0; color:var(--console-text); font-weight:650; }
.method-legend summary::marker { color:var(--console-accent); }
.method-legend dl { display:grid; grid-template-columns:minmax(120px,.65fr) minmax(0,1.6fr); gap:7px 12px; margin-bottom:1px; }
.method-legend dt { color:var(--console-accent); font:600 11px/1.5 var(--mono); }
.method-legend dd { margin:0; }
.method-footnote { padding-block:7px; }

#path-finder { width:min(600px,calc(100vw - 20px)); }
#path-from { display:grid; gap:4px; margin:0 0 13px; padding:9px 12px; border-left:2px solid var(--console-accent); background:var(--console-well); }
#path-from strong { color:var(--console-text); font:660 15px/1.3 var(--sans); overflow-wrap:anywhere; }
.path-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.path-fields label { min-width:0; color:var(--console-muted); font:650 11px/1.3 var(--mono); }
#path-finder :is(#path-query,#path-mode) {
  display:block; min-height:43px; margin-top:4px; border-color:var(--console-line); border-radius:7px;
  color:var(--console-text); background:var(--console-well); font:14px/1.2 var(--sans);
}
#path-results:empty,#path-output:empty { display:none; }
#path-results:not(:empty) { margin:8px 0 0; }
#path-results .hit,#path-output .featured {
  display:grid; grid-template-columns:43px minmax(0,1fr) auto; align-items:center; gap:6px;
  width:100%; min-height:40px; padding:5px 7px; border:1px solid var(--console-line); border-radius:6px;
  color:var(--console-text); background:var(--console-ground); text-align:left;
}
#path-results .hit + .hit { margin-top:3px; }
#path-results .hit:hover,#path-output .featured:hover { background:var(--console-raised); }
#path-finder :is(.hit,.featured) :is(b,[aria-hidden]) { color:var(--console-accent); font:650 11px/1.2 var(--mono); }
#path-output { margin-top:12px; border-top:1px solid var(--console-line); }
#path-output h3 { width:fit-content; margin-top:12px; scroll-margin-top:61px; }
#path-output h3:focus-visible { outline-width:1px; outline-offset:4px; }
.path-metrics span { white-space:nowrap; }
#path-finder #path-output .path-project { margin-bottom:9px; color:#09201e; background:var(--console-accent); border-color:var(--console-accent); }
#path-finder #path-output .path-project:hover { background:#cbf6ef; }
#path-output ol { counter-reset:path-step; }
#path-output .path-step {
  position:relative; margin:0 0 4px; padding:7px 7px 8px 38px;
  border:1px solid var(--console-line); border-radius:7px; color:var(--console-muted); background:var(--console-well);
}
.path-step::before {
  counter-increment:path-step; content:counter(path-step,decimal-leading-zero);
  position:absolute; top:8px; left:7px; padding:3px; border:1px solid var(--console-line); border-radius:4px;
  color:var(--console-accent); font:650 10px/1.2 var(--mono);
}
#path-output .path-step strong { color:var(--console-text); }
#path-output .path-step div { margin-top:4px; }

#path-trace { padding:9px 10px; scrollbar-color:#527181 var(--console-well); }
#path-trace .trace-header { margin-bottom:4px; }
#trace-count { display:block; margin-top:2px; color:var(--console-muted); font:600 11px/1.25 var(--mono); }
#trace-progress { display:block; width:100%; height:4px; margin-bottom:6px; accent-color:var(--console-accent); }
#trace-content #trace-title { color:var(--console-text); font:660 15px/1.25 var(--sans); overflow-wrap:anywhere; }
#trace-content :is(#trace-title span,.trace-type,a) { color:var(--console-accent); }
#trace-content p { color:var(--console-muted); }
#path-trace #trace-overview { border-color:#65999f; color:var(--console-accent); background:var(--console-raised); }

@media(max-width:560px) {
  .immersive :is(#list-panel,#inspector:not(:modal)) { width:auto; }
  .immersive #list-panel .panel-head,.immersive #inspector:not(:modal) .rail-head { flex-basis:53px; }
  .immersive #list-panel .list-entry { min-height:51px; }
  .method-guide { grid-template-columns:1fr; }
  .method-legend dl { grid-template-columns:minmax(0,1fr); row-gap:3px; }
  .method-legend dd + dt { margin-top:3px; padding-top:5px; border-top:1px solid var(--console-line); }
}
@media(max-width:420px) {
  .path-fields { grid-template-columns:1fr; }
  #path-finder :is(#path-query,#path-mode) { font-size:16px; }
}
@media(max-height:480px) {
  #path-trace { max-height:min(54dvh,245px); }
  .console-dialog .dialog-top { min-height:44px; margin-bottom:8px; }
}
@media(pointer:coarse) {
  :is(#list-panel,#inspector:not(:modal),#empty-map,.console-dialog,#path-trace) :is(.small-action,.close-dossier,#trace-close,.trace-actions button) { min-height:44px; }
}

/* Archive surfaces are separate from the galaxy. */
.immersive #inspector { left:auto; max-width:none; max-height:none; margin:0; padding:0; color-scheme:light; }
.archive-brand,.archive-controls { display:flex; align-items:center; gap:9px; }
.archive-brand { min-width:0; }
.archive-mark,.archive-kicker,.archive-action-label,.archive-folder-index { display:none; }
.archive-controls { flex:none; margin-left:auto; }
.archive-folder { flex:1; min-width:0; min-height:0; display:flex; flex-direction:column; }
.archive-workspace { flex:1; min-height:0; display:flex; }
.archive-page-stack { flex:1; min-width:0; min-height:0; display:flex; }
.archive-page-stack > #detail { min-width:0; }

.immersive #inspector:modal {
  --folder-gap:clamp(12px,2.2vw,34px);
  --archive-paper:#e7deca;
  --archive-rule:#80674763;
  --archive-ink:#211c17;
  --archive-red:#793d32;
  --archive-type:var(--mono);
  --archive-fund-ink:#fce8c8;
  --archive-fund-top:#754238;
  --archive-fund-bottom:#542c26;
  --archive-fund-stroke:#513127;
  --archive-cloth-dark:#191414;
  --archive-cloth-light:#342522;
  --archive-board-top:#5e4235;
  --archive-board-end:#32231e;
  --archive-board-seam:#a58055;
  --archive-weave:repeating-linear-gradient(91deg,#ceb2900d 0 1px,transparent 1px 3px),
    repeating-linear-gradient(1deg,#18110e24 0 1px,transparent 1px 3px);
  --folder-grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='144' height='144'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='144' height='144' opacity='.24' filter='url(%23g)'/%3E%3C/svg%3E");
  --paper-patina:
    radial-gradient(ellipse at 101% 2%,#654c2e30,transparent 30%),
    radial-gradient(ellipse at -6% 98%,#72552d29,transparent 33%),
    linear-gradient(90deg,#49342125 0,transparent 5%,transparent 94%,#654b2726 100%);
  position:fixed;
  inset:max(var(--folder-gap),env(safe-area-inset-top,0px)) max(var(--folder-gap),env(safe-area-inset-right,0px))
        max(var(--folder-gap),env(safe-area-inset-bottom,0px)) max(var(--folder-gap),env(safe-area-inset-left,0px));
  width:auto; height:auto; max-width:none; max-height:none!important; margin:auto;
  translate:none!important;
  border:0; border-radius:0; background:none; box-shadow:none; overflow:visible;
}
.immersive #inspector:modal:not([hidden]) { animation:none; }
.immersive #inspector:modal[data-archive-fund=b] {
  --archive-fund-ink:#f7efd4;
  --archive-fund-top:#4d5c4a;
  --archive-fund-bottom:#334332;
  --archive-fund-stroke:#29392c;
  --archive-cloth-dark:#151c17;
  --archive-cloth-light:#2b352b;
  --archive-board-top:#4c5039;
  --archive-board-end:#272d24;
  --archive-board-seam:#898462;
}
.immersive #inspector:modal[data-archive-fund=d] {
  --archive-fund-ink:#e1ecf2;
  --archive-fund-top:#455963;
  --archive-fund-bottom:#2d3f4a;
  --archive-fund-stroke:#25333c;
}
.immersive #inspector:modal[data-archive-fund=s] {
  --archive-fund-ink:#f4e8d2;
  --archive-fund-top:#6a5637;
  --archive-fund-bottom:#493a2a;
  --archive-fund-stroke:#3b2e22;
}
.immersive #inspector:modal[data-archive-fund=p] {
  --archive-fund-ink:#ecf4e2;
  --archive-fund-top:#3e615c;
  --archive-fund-bottom:#28433f;
  --archive-fund-stroke:#1f3532;
}
.immersive #inspector:modal[data-archive-fund=h] {
  --archive-fund-ink:#f9e7cd;
  --archive-fund-top:#754a36;
  --archive-fund-bottom:#4e3024;
  --archive-fund-stroke:#38231c;
}
.immersive #inspector:modal[data-archive-fund=a] {
  --archive-fund-ink:#f6e9cb;
  --archive-fund-top:#6b5f43;
  --archive-fund-bottom:#443e2f;
  --archive-fund-stroke:#302c21;
}
.immersive #inspector:modal[data-archive-fund=g] {
  --archive-fund-ink:#eae4f3;
  --archive-fund-top:#50465a;
  --archive-fund-bottom:#312936;
  --archive-fund-stroke:#25202a;
}
.immersive #inspector:modal[data-archive-fund=m] {
  --archive-fund-ink:#f0e1dc;
  --archive-fund-top:#664647;
  --archive-fund-bottom:#412b2c;
  --archive-fund-stroke:#302123;
}
.immersive #inspector:modal[data-archive-fund=k] {
  --archive-fund-ink:#f4e5ca;
  --archive-fund-top:#694e38;
  --archive-fund-bottom:#443128;
  --archive-fund-stroke:#30231c;
}
.immersive #inspector:modal[data-archive-fund=l] {
  --archive-fund-ink:#e2eee5;
  --archive-fund-top:#465c54;
  --archive-fund-bottom:#2b3c37;
  --archive-fund-stroke:#202f2a;
}
.immersive #inspector:modal[data-archive-fund=v] {
  --archive-fund-ink:#e4eaf3;
  --archive-fund-top:#425569;
  --archive-fund-bottom:#293849;
  --archive-fund-stroke:#202c39;
}
.immersive #inspector:modal[data-archive-fund=w] {
  --archive-fund-ink:#e3edf1;
  --archive-fund-top:#39576b;
  --archive-fund-bottom:#233a4b;
  --archive-fund-stroke:#172b39;
}
.immersive #inspector:modal[data-archive-fund=u] {
  --archive-fund-ink:#e3eee8;
  --archive-fund-top:#47625c;
  --archive-fund-bottom:#2a413d;
  --archive-fund-stroke:#20332f;
}
.immersive #inspector:modal[data-archive-fund=x] {
  --archive-fund-ink:#e5edf1;
  --archive-fund-top:#495574;
  --archive-fund-bottom:#303950;
  --archive-fund-stroke:#242b3d;
}
.immersive #inspector:modal[data-archive-fund=y] {
  --archive-fund-ink:#eee7de;
  --archive-fund-top:#66504b;
  --archive-fund-bottom:#473530;
  --archive-fund-stroke:#342724;
}
.immersive #inspector:modal[data-archive-fund=j] {
  --archive-fund-ink:#e8e7d8;
  --archive-fund-top:#515744;
  --archive-fund-bottom:#333b30;
  --archive-fund-stroke:#242b22;
}
.immersive #inspector:modal[data-archive-fund=f] {
  --archive-fund-ink:#ede5dc;
  --archive-fund-top:#65516b;
  --archive-fund-bottom:#42354b;
  --archive-fund-stroke:#302737;
}
.immersive #inspector:modal[data-archive-fund=r] {
  --archive-fund-ink:#efe8df;
  --archive-fund-top:#664a4d;
  --archive-fund-bottom:#473235;
  --archive-fund-stroke:#352428;
}
.immersive #inspector:modal[data-archive-fund=e] {
  --archive-fund-ink:#f7eacc;
  --archive-fund-top:#655336;
  --archive-fund-bottom:#413421;
  --archive-fund-stroke:#302618;
}
.immersive #inspector:modal[data-archive-fund=q] {
  --archive-fund-ink:#f1e5dd;
  --archive-fund-top:#654857;
  --archive-fund-bottom:#44313f;
  --archive-fund-stroke:#342632;
}
.immersive #inspector:modal[data-archive-fund=i] {
  --archive-fund-ink:#e9f2e9;
  --archive-fund-top:#405b5a;
  --archive-fund-bottom:#2a403f;
  --archive-fund-stroke:#203130;
}
#inspector::backdrop {
  background:radial-gradient(ellipse at 40% 12%,#231710d2,#040408f5 74%);
}
#inspector.dossier-opening::backdrop { animation:archive-veil-in var(--archive-veil-duration,200ms) ease-out both; }
#inspector.dossier-closing::backdrop { animation:archive-veil-out 190ms ease-in both; }
#inspector.dossier-opening .dossier-document { animation:archive-sheet-in 175ms ease-out 25ms both; }
@keyframes archive-veil-in { from { opacity:0; } to { opacity:1; } }
@keyframes archive-veil-out { from { opacity:1; } to { opacity:0; } }
@keyframes archive-sheet-in { from { opacity:.35; transform:translateY(9px); } to { opacity:1; transform:none; } }
@media(prefers-reduced-motion:reduce) {
  #inspector.dossier-opening::backdrop,#inspector.dossier-closing::backdrop,#inspector.dossier-opening .dossier-document { animation:none; }
}

#inspector:modal .archive-folder { --folder-tab:34px; position:relative; isolation:isolate; padding-top:var(--folder-tab); }
#inspector:modal .archive-folder::before {
  content:""; position:absolute; inset:var(--folder-tab) 0 0; z-index:-1;
  border:1px solid var(--archive-board-seam); border-radius:5px 5px 13px 8px;
  background:var(--folder-grain),var(--archive-weave),
    linear-gradient(90deg,#e4b67a45,transparent 15%,#ac81533a 67%,transparent) bottom 5px left 13px / calc(100% - 26px) 1px no-repeat,
    radial-gradient(ellipse at 96% 2%,#c0875527,transparent 49%),
    linear-gradient(105deg,var(--archive-board-end),var(--archive-board-top) 38%,var(--archive-board-end));
  box-shadow:inset 0 1px #ead2a65c,inset 0 -4px #17100e9c,inset 0 -8px #ad89531e,
    0 28px 80px #000e,0 5px 1px #140e0c;
}
#inspector:modal .archive-folder-index {
  position:absolute; right:0; top:0; z-index:0;
  display:flex; justify-content:space-between; align-items:center; gap:15px;
  min-width:clamp(194px,24vw,300px); height:calc(var(--folder-tab) + 1px);
  padding:2px 15px 0 28px; color:var(--archive-fund-ink);
  clip-path:polygon(0 100%,12px 27%,21px 0,calc(100% - 8px) 0,100% 7px,100% 100%);
  border:1px solid var(--archive-fund-stroke); border-bottom:0; border-radius:5px 8px 0 0;
  background:var(--folder-grain),var(--archive-weave),
    linear-gradient(107deg,#17110e69,transparent 52%,#160e0c65),
    linear-gradient(180deg,var(--archive-fund-top),var(--archive-fund-bottom));
  box-shadow:inset 0 1px #edc9997d,inset 0 -4px #21100b76;
  text-transform:uppercase; font:600 11px/1 var(--archive-type); letter-spacing:.13em;
}
.archive-folder-index b {
  padding:3px 9px; border:1px solid #9a815c; color:#36291e;
  background:var(--folder-grain),linear-gradient(177deg,#f0dfbb,#c1a477);
  box-shadow:1px 2px #150c0a85,inset 0 0 0 1px #f5dfae5e;
  font:600 14px/1 var(--archive-type); letter-spacing:.08em;
}
.immersive #inspector:modal .rail-head {
  position:relative; flex:0 0 58px; padding:0 clamp(11px,1.8vw,25px);
  color:#f9e9cb; border-radius:5px 2px 0 0;
  background:var(--folder-grain),var(--archive-weave),
    linear-gradient(0deg,#0007,transparent 44%),linear-gradient(105deg,var(--archive-cloth-light),var(--archive-cloth-dark) 84%);
  border-bottom:1px solid var(--archive-board-seam);
  box-shadow:inset 0 1px #c5a98366,inset 0 -3px #09070678;
  cursor:default;
}
.immersive #inspector:modal .rail-head::after {
  content:""; position:absolute; inset:auto 12px 3px; height:1px; pointer-events:none;
  background:repeating-linear-gradient(90deg,#d8b98948 0 3px,transparent 3px 7px);
}
#inspector:modal .archive-brand { gap:12px; }
#inspector:modal .archive-mark {
  display:grid; place-items:center; flex:0 0 34px; height:34px;
  color:#dfbd91; background:linear-gradient(145deg,#4e3b27,#211a14 69%);
  border:1px solid #947c5c; border-radius:2px;
  box-shadow:inset 0 0 0 2px #fff2cd10,1px 2px 2px #0009;
}
#inspector:modal .archive-kicker {
  display:block; color:#e6c5a0; font:600 10px/1.25 var(--archive-type); text-transform:uppercase; letter-spacing:.12em;
}
.immersive #inspector:modal #inspector-title { margin:3px 0 0; color:#fff1d8; font:620 21px/.94 var(--serif); letter-spacing:.01em; text-transform:none; }
.immersive #inspector:modal .archive-action {
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  width:auto; min-width:44px; height:38px; padding:0 11px; border-radius:3px;
  color:#f9e9d0; background:#1613105e; border:1px solid #ad936a87;
  font:600 12px/1.15 var(--sans);
}
.immersive #inspector:modal .archive-action:hover { background:#ae8d5e31; border-color:#efd0a5; }
#inspector:modal #close-dossier { border-color:#b37a68a1; }
#inspector:modal .archive-action:focus-visible { outline-color:#f0ca8e; }
#inspector:modal .dossier-tabs button:focus-visible { outline-color:#a55e3f; }
#inspector:modal .archive-action > span[aria-hidden] { font:20px/1 var(--sans); }
#inspector:modal .archive-action-label { display:inline; }

#inspector:modal .archive-workspace { display:grid; grid-template-columns:clamp(148px,13vw,187px) minmax(0,1fr); }
.archive-spine {
  position:relative; min-height:0; display:flex; flex-direction:column; gap:20px;
  padding:26px 0 17px 15px; margin-bottom:6px; border-radius:0 0 0 6px;
  background:var(--folder-grain),var(--archive-weave),
    linear-gradient(94deg,var(--archive-cloth-light),var(--archive-cloth-dark) 89%,#070606);
  box-shadow:inset 1px 0 #cbb08a57,inset -5px 0 #0f0d0aa1,inset -7px 0 #b2946655;
}
.spine-label {
  flex:none; display:grid; gap:6px; margin:0 17px 0 2px; padding:9px 10px 10px;
  border:1px solid #a18a61; outline:1px dashed #735c3f71; outline-offset:-4px;
  background:var(--folder-grain),linear-gradient(153deg,#e9d8b3,#c0a77d); color:#342419;
  box-shadow:2px 4px 6px #090704bb,inset 0 0 9px #70563c37; transform:rotate(-1.25deg);
}
.spine-label span,.dossier-id,.evidence-tab {
  font:600 11px/1.35 var(--archive-type,var(--mono)); text-transform:uppercase; letter-spacing:.10em;
}
.spine-label span { border-bottom:1px solid #9d744769; }
.spine-label b { font:700 clamp(13px,1.3vw,17px)/1.18 var(--archive-type); }
.archive-spine::after {
  content:""; position:absolute; left:14px; bottom:10px; width:calc(100% - 26px); height:22px;
  border-bottom:1px dashed #e2bf8878; border-left:1px dashed #e2bf8878;
  border-radius:0 0 0 4px; pointer-events:none;
}
#inspector:modal .dossier-tabs {
  flex:none; display:grid; grid-template-columns:minmax(0,1fr); gap:7px; padding:0;
  margin-right:-1px; border:0; background:none; z-index:4;
}
#inspector:modal .dossier-tabs button {
  --index-paper:#c6b18c; bottom:auto; justify-content:flex-start; gap:8px; min-height:45px; padding:6px 9px 6px 8px;
  border:1px solid #907950; border-radius:7px 0 0 3px;
  color:#38291e; background:var(--folder-grain),linear-gradient(180deg,#f2ddab25,#3a261d25),var(--index-paper);
  font:600 13px/1.16 var(--archive-type);
  box-shadow:1px 3px 2px #1009079c,inset 0 1px #fff0d19c;
}
#inspector:modal #dossier-tab-links { --index-paper:#b1b095; }
#inspector:modal #dossier-tab-sources { --index-paper:#bd9a85; }
#inspector:modal .dossier-tabs button:hover { background:var(--folder-grain),#f4e5c2; }
#inspector:modal .dossier-tabs button[aria-selected=true] {
  border-color:#ac885a transparent #ac885a var(--archive-red);
  border-left-width:3px; padding-left:6px;
  background:var(--folder-grain),linear-gradient(90deg,#f6eedc,var(--archive-paper) 88%); color:#6a3229;
  box-shadow:-1px 2px 4px #261b125e,inset 0 1px #fff7e1a6;
}
#inspector:modal .dossier-tabs button[aria-selected=true] i { color:var(--archive-red); font-weight:700; }
#inspector:modal .dossier-tabs i { color:#73513a; font:10px/1 var(--archive-type); }
#inspector:modal .dossier-tabs span {
  margin-left:auto; padding:2px 4px; border:1px solid #6e4f342e; color:#5e402c; font:10px/1 var(--archive-type);
}

#inspector:modal .archive-page-stack {
  position:relative; isolation:isolate; margin:11px clamp(19px,2.3vw,34px) 29px 5px;
}
#inspector:modal .archive-page-stack::before,#inspector:modal .archive-page-stack::after {
  content:""; position:absolute; pointer-events:none; inset:2px 0 0 1px;
  border:1px solid #846b45; border-radius:2px;
  background:var(--folder-grain),#a69877; box-shadow:0 4px 6px #110a09a6;
}
#inspector:modal .archive-page-stack::before {
  transform:translate(11px,13px) rotate(.31deg);
  background:var(--folder-grain),
    repeating-linear-gradient(0deg,#5a472c5c 0 1px,transparent 1px 3px) bottom / 100% 7px no-repeat,
    linear-gradient(160deg,#bcaa83,#9e8a65);
}
#inspector:modal .archive-page-stack::after {
  transform:translate(6px,7px) rotate(-.18deg);
  background:var(--folder-grain),
    linear-gradient(136deg,transparent 44%,#826a45 48%,#ead6ad 52%,#cfb888 84%) right bottom / 19px 19px no-repeat,
    repeating-linear-gradient(0deg,#60492c3b 0 1px,transparent 1px 3px) bottom / 100% 6px no-repeat,
    #caba96;
}
.immersive #inspector:modal #detail {
  --page-rule-x:25px;
  --folio-glow:#f5eedf;
  --punch-ink:#45362b;
  position:relative; z-index:2; border:1px solid #a08a65; border-radius:1px;
  padding:clamp(19px,2.65vw,38px) clamp(19px,3.15vw,49px) clamp(27px,4vw,54px) clamp(39px,4.15vw,61px);
  background:
    var(--folder-grain),
    radial-gradient(circle at 12px 26%,#1b1411 0 2.6px,var(--punch-ink) 3.4px 4.2px,#967248d4 4.5px 5.1px,#fff1c8af 5.2px 5.8px,transparent 6.2px),
    radial-gradient(circle at 12px 74%,#1b1411 0 2.6px,var(--punch-ink) 3.4px 4.2px,#967248d4 4.5px 5.1px,#fff1c8af 5.2px 5.8px,transparent 6.2px),
    linear-gradient(90deg,transparent var(--page-rule-x),#87433259 var(--page-rule-x),#87433259 calc(var(--page-rule-x) + 1px),transparent calc(var(--page-rule-x) + 1px)),
    var(--paper-patina),
    radial-gradient(ellipse at 51% 11%,var(--folio-glow) 12%,transparent 76%),
    var(--archive-paper);
  box-shadow:0 5px 16px #21140f94,inset 1px 0 #fff1cf75,inset 0 0 22px #8d6f4037;
  scrollbar-color:#8f7451 #d1c2a2; scrollbar-width:thin; overscroll-behavior:contain;
}
.immersive #inspector:modal #detail:has([data-page=links]) { --folio-glow:#ebe9d1; }
.immersive #inspector:modal #detail:has([data-page=sources]) { --folio-glow:#f2e5d2; }
.dossier-document {
  --folio-thread:color-mix(in srgb,var(--dossier-ink) 24%,var(--archive-fund-bottom));
  max-width:1170px; margin-inline:auto;
}
.dossier-document[data-page=reading] {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(225px,.55fr); align-items:start;
  column-gap:clamp(23px,3.6vw,53px);
}
.dossier-document[data-page=reading] > :not(.dossier-evidence) { grid-column:1; }
#inspector:modal .dossier-document[data-page=reading] > .dossier-heading { grid-column:1/-1; grid-row:1; }
.dossier-document[data-page=reading] > .dossier-evidence { grid-column:2; grid-row:2/span 3; }
.dossier-introduction { margin:0 0 22px; padding:0 0 15px; border-bottom:1px solid #9b82634f; }
#inspector:modal .dossier-introduction p { color:#3d3126; font:400 clamp(17px,1.48vw,20px)/1.57 var(--serif); margin:10px 0; text-wrap:pretty; }
#inspector:modal .dossier-introduction .section-label { color:var(--archive-fund-bottom); margin-bottom:9px; }
#inspector:modal .dossier-heading {
  display:block; margin:0 0 20px; padding:0 0 14px;
  border:0; border-bottom:1px solid #7e674b;
  background:
    linear-gradient(90deg,var(--folio-thread),var(--archive-red)) left bottom / 53px 3px no-repeat,
    linear-gradient(90deg,#fff3d838,transparent 70%) left bottom / 100% 5px no-repeat;
}
#inspector:modal .dossier-id {
  display:flex; align-items:center; flex-wrap:wrap; gap:5px 13px;
  margin:0 0 13px; padding:6px 0; border-block:1px solid #8270507a; border-top-style:dashed;
  color:var(--archive-fund-bottom); font:600 11px/1.28 var(--archive-type); letter-spacing:.10em;
}
.dossier-record-type { display:inline-flex; align-items:center; gap:8px; margin-right:auto; }
.dossier-record-type::before {
  content:""; flex:0 0 6px; width:6px; height:6px;
  border:1px solid var(--archive-fund-bottom); background:var(--folio-thread); transform:rotate(45deg);
}
.dossier-folio {
  display:inline-block; padding:2px 7px; color:var(--archive-fund-bottom); border:1px solid #9e8263;
  background:var(--folder-grain),color-mix(in srgb,var(--folio-thread) 16%,#ded3ba);
  box-shadow:1px 1px #70593a28; font-weight:700;
}
#inspector:modal #dossier-heading {
  margin:0; color:var(--archive-ink);
  font:670 clamp(35px,4.05vw,65px)/.99 var(--serif);
  font-optical-sizing:auto; letter-spacing:-.037em; text-wrap:pretty; overflow-wrap:anywhere;
}
#inspector:modal #dossier-heading:focus { outline:none; }
.dossier-head-meta { display:flex; flex-wrap:wrap; gap:5px 15px; align-items:baseline; margin:5px 0 0; }
#inspector:modal .dossier-sector { display:block; color:#6b5039; font:600 11px/1.3 var(--archive-type); }
#inspector:modal .dossier-aliases { margin:0; color:#6d4e35; font:600 11px/1.45 var(--archive-type); min-width:0; }
.dossier-aliases summary { width:fit-content; cursor:pointer; }
.dossier-aliases summary span { margin-left:4px; padding:0 3px; border:1px solid #a888665c; }
#inspector:modal .dossier-aliases p { margin:5px 0 0; color:#574a3b; font:400 13px/1.45 var(--sans); }
.dossier-register { display:contents; }
.dossier-register-label,.dossier-register-chapter { display:none; }
.dossier-assessment { display:flex; align-items:center; flex-wrap:wrap; gap:4px 10px; min-width:0; margin:12px 0 3px; }
.dossier-stamp {
  --stamp-ink:#81392e;
  display:inline-grid; gap:3px; max-width:100%;
  margin:0; padding:5px 8px; transform:rotate(-1.35deg);
  border:3px double color-mix(in srgb,var(--stamp-ink) 82%,#e2cfac);
  border-radius:1px 3px 2px 1px; color:var(--stamp-ink);
  background:var(--folder-grain),color-mix(in srgb,var(--stamp-ink) 5%,transparent);
  box-shadow:1px 0 color-mix(in srgb,var(--stamp-ink) 32%,transparent);
}
.dossier-stamp:is([data-verdict="documented"],[data-verdict="solved"]) { --stamp-ink:#4e5937; }
.dossier-stamp[data-verdict="partial"] { --stamp-ink:#72531d; }
.dossier-stamp[data-verdict="unsolved"] { --stamp-ink:#50516b; }
.dossier-stamp[data-verdict="folklore"] { --stamp-ink:#4d5169; }
.dossier-stamp[data-verdict="model"] { --stamp-ink:#22586b; }
.dossier-stamp[data-verdict="disputed"],.dossier-stamp[data-verdict="hypothesis"] { --stamp-ink:#755019; }
.stamp-kicker { font:700 9px/1.25 var(--archive-type); text-transform:uppercase; letter-spacing:.07em; }
#inspector:modal .dossier-stamp .status { margin:0; padding:0; border:0; background:none; color:inherit; font:700 13px/1.1 var(--archive-type); text-transform:uppercase; letter-spacing:.035em; }
#inspector:modal .dossier-stamp .status::before { display:none; }
#inspector:modal .dossier-stamp .scope { display:none; }
.dossier-scope { min-width:0; max-width:100%; color:#6c4f39; font:600 11px/1.35 var(--archive-type); }
.dossier-scope summary { width:fit-content; cursor:pointer; padding-block:5px; }
.dossier-scope[open] { flex-basis:100%; }
#inspector:modal .dossier-scope p { margin:3px 0 0; color:#564534; font:400 13px/1.4 var(--sans); overflow-wrap:anywhere; }
#inspector:modal .dossier-scope[open] p {
  padding:6px 8px; border-left:2px solid #9c7456; background:#f9ecd45e;
}
#inspector:modal .dossier-actions { gap:6px; margin-top:11px; }
.dossier-actions b { font:inherit; }
.dossier-action-compact,#dossier-open-attachment { display:none; }
#inspector:modal .dossier-document:not([data-page=reading]) #dossier-open-attachment { display:none; }
#inspector:modal .small-action {
  min-height:38px; padding:5px 9px; border-color:#a18a67;
  background:var(--folder-grain),linear-gradient(171deg,#f6ebd4,#e2d2b3);
  box-shadow:1px 1px #7c623826;
}
#inspector:modal .small-action:hover { border-color:var(--archive-red); background:#ecdbc1; }
#inspector:modal .dossier-document :is(summary,.small-action,.finding-refs a,#view-plate):focus-visible {
  outline:2px solid var(--archive-red); outline-offset:2px;
}
.dossier-actions .small-action span { color:var(--archive-red); margin-right:3px; }
#inspector:modal #locate { color:#6d3522; font-weight:700; }
#inspector:modal .dossier-document:not([data-page=reading]) .dossier-heading {
  display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:14px; align-items:end; border-bottom-width:1px;
}
#inspector:modal .dossier-document:not([data-page=reading]) :is(.dossier-register,.dossier-head-meta) { display:none; }
#inspector:modal .dossier-document:not([data-page=reading]) #dossier-heading {
  font-size:clamp(25px,3.3vw,43px); line-height:1.03; text-wrap:initial;
}
#inspector:modal .dossier-document:not([data-page=reading]) .dossier-id { margin-bottom:6px; }
#inspector:modal .dossier-document:not([data-page=reading]) .dossier-actions { flex-wrap:nowrap; }
#inspector:modal :is(#dossier-links,#dossier-sources) {
  --ledger-rule:#8b775980;
  --ledger-fill:#f6ead473;
  --ledger-accent:var(--archive-fund-bottom);
}
#inspector:modal :is(#dossier-links,#dossier-sources) .folio-section-line {
  display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px 12px;
  margin:0 0 13px; padding:7px 0 8px;
  border-block:1px solid var(--ledger-rule);
  background:linear-gradient(90deg,#e6d4ae54,transparent 68%);
}
#inspector:modal :is(#dossier-links,#dossier-sources) .folio-section-line h4 {
  margin:0; padding-inline:8px 2px; color:var(--ledger-accent);
  font:650 clamp(20px,2.4vw,30px)/1.04 var(--serif);
}
#inspector:modal .folio-tally {
  margin-right:6px; padding:4px 7px; border:1px solid var(--ledger-rule); color:var(--ledger-accent);
  background:#f4e7cc; font:600 10px/1.2 var(--archive-type); letter-spacing:.055em;
  text-transform:uppercase; white-space:nowrap;
}
#dossier-citation-back:not([hidden]) ~ .folio-tally { display:none; }
#inspector:modal #dossier-citation-back {
  min-height:42px; margin:0 5px 0 0; padding-inline:9px;
  color:var(--ledger-accent); border-color:var(--ledger-rule); background:#f3e4c9;
}
#inspector:modal #dossier-sources .folio-section-line:has(#dossier-citation-back:not([hidden])) {
  position:sticky; top:0; z-index:3; background:#f8ead1; box-shadow:0 3px 0 #9a764b24;
}
#inspector:modal #dossier-sources:has(#dossier-citation-back:not([hidden])) .dossier-source-list li { scroll-margin-top:76px; }
#inspector:modal :is(.dossier-section,.research-summary) p { color:#44392b; font-size:clamp(14px,1.3vw,16px); line-height:1.57; }
#inspector:modal :is(.research-summary,.dossier-notes) p {
  color:#3d3126; font-family:var(--serif); font-size:clamp(16px,1.43vw,19px); line-height:1.49;
  font-optical-sizing:auto; text-wrap:pretty;
}
#inspector:modal .research-summary {
  margin:0 0 19px; padding:13px 16px 14px;
  background:var(--folder-grain),linear-gradient(162deg,#fbf4e3,#efe3c9 90%);
  border:1px solid #b8a485;
  border-left:3px solid var(--archive-fund-top); box-shadow:2px 3px #81654021;
}
#inspector:modal .research-summary .section-label {
  margin:0 0 6px; color:var(--archive-fund-bottom);
  font-weight:700; letter-spacing:.14em;
}
#inspector:modal .research-summary p { margin:0; }
.abstract-heading { border-bottom:1px solid #9b82634f; margin-bottom:7px; }
.abstract-jump,#dossier-summary-toggle { display:none; }

.dossier-evidence {
  min-width:0; position:relative; padding:0 12px 12px;
  border:1px solid #8d7454; border-radius:2px 4px 2px 1px;
  background:var(--folder-grain),
    linear-gradient(0deg,#9f825446,transparent 17px),
    linear-gradient(153deg,#cbbb9c,#b9a17b 92%);
  box-shadow:2px 3px #71553747,0 5px 11px #3e2c233c;
}
.dossier-gallery { margin-top:12px; }
.dossier-gallery > summary { cursor:pointer; padding:8px 0; font:600 12px/1.4 var(--sans); }
.dossier-gallery .dossier-plate { margin-top:10px; }
.evidence-tab {
  margin:0 -12px; padding:9px 11px; color:#fff1d6;
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:4px 12px;
  background:var(--folder-grain),var(--archive-weave),
    linear-gradient(125deg,var(--archive-cloth-dark),var(--archive-cloth-light));
  border-bottom:1px solid #937757;
  box-shadow:inset 3px 0 var(--folio-thread),inset 0 1px #d6c0a540;
}
.evidence-tab span:last-child { color:#f0d7b3; font-weight:400; letter-spacing:.055em; }
.evidence-tab b { margin-right:3px; padding:2px 4px; border:1px solid #ceaa7370; color:#f0d7b3; font-weight:600; }
.evidence-mount {
  min-width:0; position:relative; isolation:isolate; margin:14px 0 2px;
  transform:rotate(.55deg);
}
.evidence-mount::before {
  content:""; position:absolute; top:-8px; right:16px; width:14px; height:31px; z-index:1;
  border:2px solid #716755; border-bottom-color:transparent; border-radius:8px;
  box-shadow:-1px -1px #d4c4a4,inset 1px 1px #f5e8cf,2px 3px 3px #392b24a0;
  transform:rotate(13deg); pointer-events:none;
}
.evidence-mount::after {
  content:""; position:absolute; z-index:1; top:-3px; left:-7px; width:43px; height:16px;
  clip-path:polygon(0 9%,12% 0,38% 7%,55% 0,100% 12%,94% 100%,70% 89%,53% 100%,10% 94%);
  background:var(--folder-grain),linear-gradient(0deg,#ab875683,#d8ba826b);
  transform:rotate(-29deg); pointer-events:none;
}
#inspector:modal .dossier-plate {
  margin:0; padding:8px; border:1px solid #9f8a67;
  background:var(--folder-grain),linear-gradient(149deg,#f3ecdb,#dfd0b1);
  box-shadow:1px 4px 7px #44312165,inset 0 0 0 2px #f8efdbaf,inset 0 -2px #72543631;
}
#inspector:modal .dossier-plate :is(img,svg) { width:100%; max-height:min(28vh,320px); }
#inspector:modal .dossier-plate img { object-fit:contain; background:#332c25; outline:1px solid #42372c; outline-offset:-1px; }
#inspector:modal .dossier-plate figcaption { padding:9px 3px 3px; color:#493c2e; font:15px/1.28 var(--serif); }
#inspector:modal .dossier-plate.has-photo figcaption { text-wrap:pretty; }
#inspector:modal .dossier-plate figcaption a { color:#803e29; }
.plate-description,.plate-origin { display:block; }
.plate-origin { margin-top:7px; padding-top:5px; border-top:1px solid #bda78863; color:#644c37; font:11px/1.4 var(--mono); }
#view-plate { position:relative; display:block; width:100%; margin:0; padding:0; border:0; background:none; cursor:zoom-in; }
#view-plate::after {
  content:""; position:absolute; inset:0; pointer-events:none;
  box-shadow:inset 0 0 8px #21170e56;
}
#view-plate span {
  position:absolute; right:6px; bottom:6px; display:flex; align-items:center; gap:5px; height:33px; padding:0 7px;
  border:1px solid #66523b; border-radius:2px; color:#442e1d; background:#fff4daf5; font:18px/1 var(--sans);
  box-shadow:0 1px 4px #21150663;
}
#view-plate span b { font:600 10px/1 var(--archive-type); text-transform:uppercase; letter-spacing:.045em; }
#view-plate:is(:hover,:focus-visible) span { background:#fffaf0; border-color:var(--archive-red); }
.dossier-finding-index {
  position:relative; margin:12px 0 0; padding:8px 9px 7px;
  border:1px solid #b79a71; border-top:2px solid var(--archive-fund-top);
  background:var(--folder-grain),#f5e8cb; box-shadow:1px 2px #9a74472b;
}
.dossier-finding-index summary { color:#5f412b; cursor:pointer; font:700 11px/1.45 var(--archive-type); letter-spacing:.06em; text-transform:uppercase; }
.dossier-finding-index summary span { float:right; }
.dossier-finding-index ol { list-style:none; margin:7px 0 0; padding:0; }
.dossier-finding-index li { border-top:1px solid var(--archive-rule); }
.dossier-finding-index button {
  display:grid; grid-template-columns:21px minmax(0,1fr) auto; gap:6px; align-items:center;
  width:100%; padding:6px 2px; border:0; background:none; color:#4d3a27; text-align:left; font:600 12px/1.24 var(--sans);
}
.dossier-finding-index button span { color:#7b4a32; font:700 10px/1 var(--archive-type); }
.dossier-finding-index button:hover { color:#783923; background:#fff4d9; }

#inspector:modal .archive-spine .dossier-finding-index {
  margin:0 12px 17px 1px; min-height:0; overflow:auto;
  border:0; border-block:1px solid #d2aa7770; border-radius:0;
  background:#1c151521; box-shadow:none; scrollbar-width:thin;
  padding:8px 0 6px;
}
#inspector:modal .archive-spine .dossier-finding-index summary {
  padding:2px 6px 4px; color:#f2d5ad; letter-spacing:.04em;
}
#inspector:modal .archive-spine .dossier-finding-index li { border-top:1px solid #d7b98b35; }
#inspector:modal .archive-spine .dossier-finding-index button {
  grid-template-columns:18px minmax(0,1fr); padding:7px 6px;
  color:#fff0d6; font-weight:500; line-height:1.3;
}
#inspector:modal .archive-spine .dossier-finding-index button span { color:#e7c18b; }
#inspector:modal .archive-spine .dossier-finding-index button span:last-child { display:none; }
#inspector:modal .archive-spine .dossier-finding-index button:hover { background:#f6d4a629; color:#fff7e8; }
#inspector:modal .archive-spine .dossier-finding-index :focus-visible { outline:2px solid #f2cc91; outline-offset:-2px; }

#inspector:modal .dossier-notes { max-width:80ch; }
#inspector:modal .dossier-notes .findings-label {
  display:flex; align-items:center; gap:10px; margin:3px 0 0;
  color:var(--archive-fund-bottom); letter-spacing:.14em;
}
#inspector:modal .dossier-notes .findings-label::after { content:""; flex:1; border-top:1px solid var(--archive-rule); }
#inspector:modal .findings-label span { color:#6d5037; font:600 10px/1 var(--archive-type); letter-spacing:0; }
#inspector:modal .research-findings { counter-reset:finding; margin:0 0 14px; }
#inspector:modal .research-findings li {
  display:grid; grid-template-columns:27px minmax(0,1fr); column-gap:9px;
  counter-increment:finding; padding:12px 0; border-bottom:1px solid var(--archive-rule);
}
#inspector:modal .research-findings li:focus-within {
  background:linear-gradient(90deg,#a875492e,#d0ac6b1c 76%,transparent);
  box-shadow:inset 2px 0 var(--folio-thread);
}
#inspector:modal .research-findings li::before {
  grid-row:1/span 2; content:counter(finding,decimal-leading-zero);
  align-self:start; width:26px; padding:4px 0; border-block:1px solid #a88a66;
  color:#754332; background:#e9d9bc70;
  text-align:center; font:600 11px/1.1 var(--archive-type);
}
#inspector:modal .research-findings li > * { grid-column:2; }
#inspector:modal .research-findings h4 {
  font:650 clamp(20px,2vw,26px)/1.13 var(--serif); color:#382e23;
  scroll-margin-top:18px; text-wrap:pretty; overflow-wrap:anywhere;
}
#inspector:modal .research-findings h4:focus { outline:1px solid #a5724a; outline-offset:3px; background:#f6e6c5; }
#inspector:modal .finding-refs { white-space:normal; }
#inspector:modal .finding-refs a {
  display:inline-block; padding:0 3px; color:#743b28; background:#f0dfc2;
  border-radius:2px; text-decoration:none; font:600 11px/1.7 var(--mono);
}
#inspector:modal .finding-refs a:hover { text-decoration:underline; background:#e7c9a3; }
#inspector:modal .dossier-original {
  border:1px solid #b49a73; border-left:3px solid #987b52;
  background:var(--folder-grain),linear-gradient(155deg,#f6ead2,#e7d6b5);
}
#inspector:modal .dossier-original summary {
  padding:10px 12px; color:#634734; font:600 11px/1.45 var(--archive-type); letter-spacing:.04em;
}
#inspector:modal .dossier-original[open] summary { border-bottom:1px dashed var(--archive-rule); }
#inspector:modal .dossier-original p { margin:0; padding:10px 12px 12px; }

#inspector:modal #dossier-links .dossier-connections {
  counter-reset:relation-row; border:1px solid var(--ledger-rule);
  border-top:2px solid var(--ledger-accent); background:var(--ledger-fill);
}
#inspector:modal #dossier-links .connection-divider {
  --divider-ink:color-mix(in srgb,var(--relation-ink) 38%,#443124);
  display:flex; justify-content:space-between; align-items:center; gap:10px;
  margin:0; padding:7px clamp(9px,1.4vw,18px);
  border-block:1px solid var(--ledger-rule); border-left:3px solid var(--divider-ink);
  background:color-mix(in srgb,var(--divider-ink) 11%,#f4e6c9);
  color:var(--divider-ink); font:700 11px/1.3 var(--archive-type);
  text-transform:uppercase; letter-spacing:.085em;
}
#inspector:modal #dossier-links .connection-divider:first-child { border-top:0; }
#inspector:modal #dossier-links .connection-divider span {
  padding:2px 5px; border:1px solid currentColor; font-variant-numeric:tabular-nums;
}
#inspector:modal #dossier-links .connection-box {
  --connection-thread:color-mix(in srgb,var(--relation-ink) 55%,#533725);
  --connection-tint:color-mix(in srgb,var(--connection-thread) 12%,#fcf4e1);
  display:grid; grid-template-columns:27px minmax(0,.88fr) minmax(0,1.2fr);
  column-gap:clamp(8px,1.3vw,17px); align-items:start;
  margin:0; padding:10px clamp(8px,1.3vw,16px); border:0;
  counter-increment:relation-row; background:transparent;
  box-shadow:inset 3px 0 var(--connection-thread);
}
#inspector:modal #dossier-links .connection-box + .connection-box { border-top:1px solid var(--ledger-rule); }
#inspector:modal #dossier-links .connection-box:nth-of-type(even) { background:#e8d7b52f; }
#inspector:modal #dossier-links .connection-box:is(:hover,:focus-within) {
  background:linear-gradient(90deg,var(--connection-tint),transparent 76%);
  box-shadow:inset 4px 0 var(--ledger-accent);
}
#inspector:modal #dossier-links .connection-box::before {
  content:counter(relation-row,decimal-leading-zero); grid-column:1; grid-row:1/span 2;
  align-self:start; margin-top:5px; padding:3px 0; border-block:1px solid var(--ledger-rule);
  background:var(--connection-tint);
  color:#785535; text-align:center; font:600 11px/1.2 var(--archive-type);
}
#inspector:modal #dossier-links .connection-box:is(:hover,:focus-within)::before {
  border-color:var(--ledger-accent); color:var(--ledger-accent);
}
#inspector:modal #dossier-links .connection {
  grid-column:2; grid-row:1/span 2; grid-template-columns:minmax(0,1fr) auto; width:100%; min-height:44px;
  align-content:center; gap:3px 6px; padding:3px 6px;
  border:1px solid transparent; border-radius:2px; color:var(--archive-ink);
  background:transparent; font:650 clamp(18px,2vw,23px)/1.12 var(--serif);
  overflow-wrap:anywhere;
}
#inspector:modal #dossier-links .connection:is(:hover,:focus-visible) {
  border-color:var(--connection-thread); background:var(--connection-tint);
}
#inspector:modal #dossier-links .connection b {
  display:inline-flex; flex-wrap:wrap; gap:2px 6px;
  justify-self:start; max-width:100%; margin:0; padding:2px 5px;
  border-left:2px solid var(--connection-thread); background:var(--connection-tint);
  color:var(--ledger-accent); font:600 10px/1.25 var(--archive-type); letter-spacing:.045em;
}
#inspector:modal #dossier-links .connection-code {
  padding-right:5px; border-right:1px solid var(--connection-thread); white-space:nowrap;
}
#inspector:modal #dossier-links .connection > span {
  align-self:center; padding:2px 3px; color:var(--ledger-accent);
  border-bottom:1px solid var(--connection-thread); font-size:15px;
}
#inspector:modal #dossier-links .connection-box > p {
  grid-column:3; min-width:0; margin:3px 0 0; color:#4a3b2c;
  font:400 clamp(15px,1.35vw,18px)/1.42 var(--serif); text-wrap:pretty;
}
#inspector:modal #dossier-links .connection-box > a {
  grid-column:3; justify-self:start; margin:5px 0 0; color:var(--ledger-accent);
  font:600 12px/1.5 var(--sans); text-underline-offset:3px;
}
#inspector:modal #dossier-links .dossier-index {
  max-width:80ch; margin-top:19px; padding:9px 12px 11px;
  border:1px solid var(--ledger-rule); border-left:3px solid var(--ledger-accent); background:#f0e3ca6b;
}
#inspector:modal #dossier-links .dossier-index .section-label { margin-top:0; color:var(--ledger-accent); }
#inspector:modal #dossier-links .dossier-index > p { margin:5px 0 9px; font:650 19px/1.2 var(--serif); }
#inspector:modal #dossier-links .dossier-index > .featured {
  min-height:36px; margin:0 0 4px; padding:4px 6px; border-color:var(--ledger-rule); background:#fbf3e1;
}
#inspector:modal #dossier-links .dossier-index > .featured:is(:hover,:focus-visible) { background:#f0e0bd; }

#inspector:modal #dossier-sources .dossier-sources-grid {
  display:grid; grid-template-columns:minmax(0,2.4fr) minmax(180px,1fr);
  gap:13px clamp(16px,3vw,36px); align-items:start;
}
#inspector:modal #dossier-sources .dossier-sources-grid > * { min-width:0; }
#inspector:modal #dossier-sources .dossier-sources-grid > .research-leads:only-child { grid-column:1/-1; }
#inspector:modal #dossier-sources .dossier-source-list {
  gap:0; margin:0; border:1px solid var(--ledger-rule);
  border-top:2px solid var(--ledger-accent); background:var(--ledger-fill);
}
#inspector:modal #dossier-sources .dossier-source-list li {
  grid-template-columns:30px minmax(0,1fr); gap:12px; padding:10px 9px; scroll-margin:12px;
  border-bottom:1px solid var(--ledger-rule);
}
#inspector:modal #dossier-sources .dossier-source-list li:last-child { border-bottom:0; }
#inspector:modal #dossier-sources .dossier-source-list li:nth-child(even) { background:#e8d7b52f; }
#inspector:modal #dossier-sources .dossier-source-list li > span {
  padding:5px 2px; border:1px solid var(--ledger-rule); background:#efe1c5;
  color:var(--ledger-accent); font:600 11px/1.1 var(--archive-type);
}
#inspector:modal #dossier-sources .dossier-source-list li:focus-within {
  background:#f8edcf; box-shadow:inset 3px 0 var(--ledger-accent);
}
#inspector:modal #dossier-sources .dossier-source-list li.is-cited {
  box-shadow:inset 3px 0 var(--archive-red); background:linear-gradient(102deg,#f3dfb8,#f8edcf);
}
#inspector:modal #dossier-sources .dossier-source-list li.is-cited > span {
  color:#6f3127; border-color:#aa7656; background:#efd1a5;
}
#inspector:modal #dossier-sources .dossier-source-list li a {
  color:var(--ledger-accent); font:600 clamp(16px,1.55vw,20px)/1.24 var(--serif);
  text-decoration-thickness:1px; text-underline-offset:3px;
}
#inspector:modal #dossier-sources .dossier-source-list li small {
  display:block; margin-top:4px; color:#665139;
  font:400 11px/1.3 var(--archive-type); overflow-wrap:anywhere;
}
#inspector:modal #dossier-sources .source-use {
  display:flex; flex-wrap:wrap; align-items:center; gap:4px 6px; margin-top:6px;
  color:#60432f; font:700 10px/1.2 var(--archive-type);
}
#inspector:modal #dossier-sources .source-use > span { margin-right:2px; text-transform:uppercase; letter-spacing:.06em; }
#inspector:modal #dossier-sources .source-use button {
  min-height:28px; padding:3px 6px; border:1px solid #b59c77; border-radius:2px;
  color:#743b28; background:#f5e7ca; font:700 11px/1.2 var(--archive-type);
}
#inspector:modal #dossier-sources .source-use button:hover { border-color:#743b28; background:#ead2ac; }
#inspector:modal #dossier-sources .research-leads {
  margin:0; padding:11px 12px; border:1px solid var(--ledger-rule);
  border-top:3px solid var(--ledger-accent);
  background:linear-gradient(144deg,#f8edd4,#ecdcbd);
  box-shadow:2px 3px 0 #a6875c29;
}
#inspector:modal #dossier-sources .research-leads .section-label { color:var(--ledger-accent); }
#inspector:modal #dossier-sources .research-leads .section-label:first-child { margin-top:0; }
#inspector:modal #dossier-sources .research-leads :is(a,small) { overflow-wrap:anywhere; }
#inspector:modal :is(#dossier-links,#dossier-sources) :is(a,button):focus-visible {
  outline:2px solid var(--archive-red); outline-offset:2px;
}
.dossier-route { margin-bottom:16px; padding:10px 12px; border:1px solid #bba383; background:#eddec4; }
.dossier-route .section-label { margin-top:0; }
.dossier-route h4 { margin:0; font:600 19px/1.15 var(--serif); }
.dossier-route .steps { display:flex; flex-wrap:wrap; gap:4px; }
.dossier-route .steps button { width:auto; border-color:#bda887; background:#f8eedc; }
.dossier-route .steps button[aria-current=step] { border-color:var(--oxide); background:#eed4b7; }
.dossier-route .step-controls { justify-content:start; margin-bottom:0; }

#plate-viewer {
  --plate-gutter:clamp(12px,2.2vw,28px);
  --plate-rule:#514a3d;
  width:min(1180px,calc(100vw - 32px)); max-width:none; max-height:calc(100dvh - 32px);
  padding:0; overflow:hidden; border:1px solid #655c4c; border-radius:5px;
  background:#171714; color:#f5ebd9; color-scheme:dark;
  box-shadow:0 28px 110px #000b,0 0 0 1px #0009;
}
#plate-viewer[open] { display:grid; grid-template-rows:auto minmax(0,1fr); }
#plate-viewer::backdrop { background:#090a0bd9; }
#plate-viewer .plate-viewer-head {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:10px var(--plate-gutter) 11px; border-bottom:1px solid var(--plate-rule);
  background:
    repeating-linear-gradient(91deg,#cdb4890a 0 1px,transparent 1px 3px),
    linear-gradient(105deg,#2e2920,#181816 70%);
}
#plate-viewer .plate-viewer-index {
  color:#d1b48a; text-transform:uppercase;
  font:600 11px/1.35 var(--mono); letter-spacing:.1em;
}
#plate-viewer h2 { margin:2px 0 0; font:500 clamp(24px,3vw,34px)/1.05 var(--serif); letter-spacing:-.025em; }
#plate-viewer .close-dossier {
  width:44px; height:44px; border:1px solid #6b6050; border-radius:3px;
  background:#24211b; color:#f5ebd9;
}
#plate-viewer .close-dossier:hover { border-color:#cba56f; background:#332b1f; }
#plate-viewer .close-dossier:focus-visible { outline-color:#ecc58c; }
#plate-viewer figure {
  margin:0; min-height:0; overflow:auto; overscroll-behavior:contain;
  scrollbar-color:#827662 #151512;
}
#plate-viewer .plate-viewer-mat {
  position:relative; display:grid; place-items:center;
  height:clamp(140px,65dvh,720px); padding:clamp(10px,2vw,25px) var(--plate-gutter);
  background:
    repeating-linear-gradient(0deg,#e9d2a406 0 1px,transparent 1px 4px),
    radial-gradient(ellipse at 50% 43%,#2d2a23,#111211 78%);
  box-shadow:inset 0 0 24px #0005;
}
#plate-viewer .plate-viewer-mat::before,#plate-viewer .plate-viewer-mat::after {
  content:""; position:absolute; width:15px; height:15px; pointer-events:none;
  border:0 solid #a68e6990;
}
#plate-viewer .plate-viewer-mat::before { inset:9px auto auto 9px; border-width:1px 0 0 1px; }
#plate-viewer .plate-viewer-mat::after { inset:auto 9px 9px auto; border-width:0 1px 1px 0; }
#plate-viewer img {
  display:block; width:100%; height:100%; min-width:0; min-height:0; object-fit:contain;
  filter:drop-shadow(0 7px 13px #0009);
}
#plate-viewer figcaption {
  display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); align-items:start;
  gap:clamp(12px,2vw,26px); padding:15px var(--plate-gutter) 17px;
  border-top:1px solid #a99472; background:linear-gradient(103deg,#f4ebd8,#e9dcc1);
  color:#382a20; color-scheme:light; overflow-wrap:anywhere;
}
#plate-viewer .plate-description { font:500 clamp(17px,2vw,21px)/1.28 var(--serif); }
#plate-viewer .plate-origin {
  margin:0; padding:0 0 0 15px; border:0; border-left:1px solid #b3a184;
  color:#564433; font:12px/1.5 var(--sans);
}
#plate-viewer .plate-origin::before {
  content:"Původ snímku"; display:block; margin-bottom:3px; color:#674630;
  font:600 10px/1.2 var(--mono); letter-spacing:.095em; text-transform:uppercase;
}
#plate-viewer .plate-origin a { color:#803a26; }
#plate-viewer .plate-origin a:hover { color:#55271b; }
#plate-viewer .plate-origin a:focus-visible { outline:2px solid #803a26; outline-offset:2px; }
@media(max-width:600px) {
  #plate-viewer { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); }
  #plate-viewer .plate-viewer-head { padding-block:7px 8px; }
  #plate-viewer .plate-viewer-mat { height:auto; min-height:clamp(120px,32dvh,230px); }
  #plate-viewer img { height:auto; max-height:clamp(105px,55dvh,490px); }
  #plate-viewer figcaption { grid-template-columns:1fr; gap:8px; padding-block:11px 12px; }
  #plate-viewer .plate-origin { padding:7px 0 0; border:0; border-top:1px solid #b3a184; }
}
@media(max-height:520px) {
  #plate-viewer .plate-viewer-mat { max-height:47dvh; }
  #plate-viewer img { max-height:calc(47dvh - 24px); }
}
@media(min-width:601px) and (max-height:520px) and (orientation:landscape) {
  #plate-viewer figure {
    display:grid; grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);
  }
  #plate-viewer .plate-viewer-mat {
    position:sticky; top:0; height:max(140px,calc(100dvh - 101px)); max-height:none;
  }
  #plate-viewer img { max-height:none; }
  #plate-viewer figcaption {
    grid-template-columns:minmax(0,1fr); align-content:start; gap:12px;
    border-top:0; border-left:1px solid #a99472;
  }
  #plate-viewer .plate-origin { padding:8px 0 0; border:0; border-top:1px solid #b3a184; }
}
@media(prefers-reduced-motion:no-preference) {
  #plate-viewer:modal { animation:archive-plate-in 160ms cubic-bezier(.17,.73,.3,1) both; }
  #plate-viewer:modal::backdrop { animation:archive-veil-in 160ms ease-out both; }
}
@keyframes archive-plate-in {
  from { opacity:0; transform:translateY(5px) scale(.992); }
  to { opacity:1; transform:none; }
}
@media(min-width:661px) {
  #inspector:modal .dossier-document[data-page=reading] .dossier-heading {
    display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:9px; align-items:end;
  }
  #inspector:modal .dossier-document[data-page=reading] .dossier-head-main { grid-column:1/-1; }
  #inspector:modal .dossier-document[data-page=reading] .dossier-assessment { justify-self:start; }
  #inspector:modal .dossier-document[data-page=reading] .dossier-actions { justify-self:end; margin-bottom:2px; }
}
@media(min-width:1010px) {
  #inspector:modal .dossier-document[data-page=reading] .dossier-heading {
    grid-template-columns:minmax(0,1fr) clamp(178px,20vw,282px); column-gap:clamp(15px,2vw,32px); align-items:start;
  }
  #inspector:modal .dossier-document[data-page=reading] .dossier-head-main { grid-column:1; }
  #inspector:modal .dossier-document[data-page=reading] .dossier-id { margin-right:0; }
  #inspector:modal .dossier-document[data-page=reading] .dossier-folio { display:none; }
  .dossier-register {
    display:grid; grid-column:2; grid-row:1/span 2; align-content:start; align-self:center; gap:7px;
    margin:2px 4px 4px 0; padding:12px;
    color:var(--archive-fund-bottom); border:1px solid #9c8463;
    background:var(--folder-grain),
      linear-gradient(90deg,#6e483045,transparent 15px),
      linear-gradient(147deg,#eee3ca,#d7c5a4);
    box-shadow:1px 1px #ece0ca,3px 4px #745b4058,0 6px 10px #49332932;
    transform:rotate(1deg);
  }
  .dossier-register-label {
    display:flex; justify-content:space-between; align-items:center; gap:6px; padding-bottom:5px;
    border-bottom:1px solid #ac9471; font:600 10px/1.3 var(--archive-type);
    letter-spacing:.08em; text-transform:uppercase;
  }
  .dossier-register-label b { white-space:nowrap; letter-spacing:0; }
  #inspector:modal .dossier-register-chapter {
    display:grid; gap:4px; margin:0; color:inherit; font:600 14px/1.25 var(--sans);
  }
  .dossier-register-chapter span {
    color:#67543d; font:600 9px/1.25 var(--archive-type); letter-spacing:.085em; text-transform:uppercase;
  }
  #inspector:modal .dossier-register .dossier-assessment { align-items:flex-start; margin:0; }
  #inspector:modal .dossier-register .dossier-stamp { margin:2px 1px; transform:rotate(-2.5deg); }
  #inspector:modal .dossier-document[data-page=reading] .dossier-actions {
    grid-column:1; justify-self:start; margin-top:10px;
  }
}

@media(max-width:860px) {
  .immersive #inspector:modal { --folder-gap:8px; }
  #inspector:modal .archive-workspace { display:flex; flex-direction:column; }
  .archive-spine { flex:none; padding:5px 10px 0; margin:0; border-radius:0; background:none; box-shadow:none; }
  .spine-label,.archive-spine::after { display:none; }
  #inspector:modal .dossier-tabs { grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; margin:0 0 -1px; }
  #inspector:modal .dossier-tabs button {
    justify-content:center; min-height:44px; border-radius:5px 5px 0 0; padding:4px; font-size:12px;
  }
  #inspector:modal .dossier-tabs button[aria-selected=true] { border-color:var(--archive-red) #a58159 var(--archive-paper); border-left-width:1px; border-top-width:2px; padding-left:4px; }
  #inspector:modal .dossier-tabs span { margin-left:0; }
  #inspector:modal .archive-page-stack { margin:0 14px 16px 10px; }
  #inspector:modal .archive-page-stack::before { transform:translate(4px,6px); }
  #inspector:modal .archive-page-stack::after { transform:translate(2px,3px); }
}
@media(max-width:660px) {
  .dossier-document[data-page=reading] { display:block; }
  .dossier-evidence { max-width:500px; margin:0 0 14px; padding:0 7px 7px; }
  .evidence-tab { margin:0 -7px; padding:6px 8px; font-size:10px; }
  .evidence-mount { margin:6px 0 0; transform:none; }
  .evidence-mount::before,.evidence-mount::after { display:none; }
  .dossier-finding-index { margin-top:6px; padding:5px 7px; }
  .dossier-finding-index button { min-height:35px; }
  .abstract-heading { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; column-gap:5px; margin-bottom:3px; }
  #inspector:modal .abstract-heading .section-label { margin:0; }
  .abstract-jump { display:inline-flex; align-items:center; min-height:32px; padding:0 2px; border:0; background:none; color:#733d29; text-decoration:underline; text-underline-offset:3px; font:700 10px/1.15 var(--archive-type); }
  #inspector:modal .dossier-plate { display:grid; grid-template-columns:minmax(68px,.36fr) minmax(0,1fr); gap:8px; align-items:center; padding:5px; }
  #inspector:modal .dossier-plate :is(img,svg) { display:block; max-height:none; height:clamp(58px,12vw,88px); }
  #inspector:modal .dossier-plate figcaption { padding:2px 0; font-size:14px; }
  #inspector:modal .dossier-plate.has-photo .plate-description { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
  #inspector:modal .dossier-plate .plate-origin { display:none; }
  #inspector:modal #view-plate span { right:3px; bottom:3px; justify-content:center; width:23px; height:23px; padding:0; font-size:13px; }
  #inspector:modal #view-plate span b { display:none; }
  #inspector:modal #dossier-sources .dossier-sources-grid { grid-template-columns:minmax(0,1fr); }
  #inspector:modal #dossier-links .connection-box { grid-template-columns:23px minmax(0,1fr); column-gap:7px; }
  #inspector:modal #dossier-links .connection-box::before { grid-row:1/span 3; }
  #inspector:modal #dossier-links .connection { grid-row:1; padding-inline:4px; }
  #inspector:modal #dossier-links .connection-box > :is(p,a) { grid-column:2; margin-inline:4px; }
  #inspector:modal #dossier-links .dossier-index > .featured { min-height:44px; }
  #inspector:modal #dossier-sources .dossier-source-list li { grid-template-columns:25px minmax(0,1fr); gap:7px; padding-inline:7px; }
  #inspector:modal #dossier-sources .source-use button { min-height:36px; padding-inline:9px; }
  #inspector:modal #dossier-sources .folio-section-line:has(#dossier-citation-back:not([hidden])) {
    top:-14px; padding-top:18px;
  }
  #inspector:modal .dossier-document:not([data-page=reading]) .dossier-heading { display:block; }
  #inspector:modal .dossier-document:not([data-page=reading]) .dossier-actions { margin-top:6px; }
}
@media(max-width:560px) {
  .immersive #inspector:not(:modal) { left:calc(var(--safe-left) + var(--screen-gap)); }
  .immersive #inspector:modal { --folder-gap:6px; }
  #inspector:modal .archive-folder { --folder-tab:26px; }
  #inspector:modal .archive-folder-index { min-width:174px; padding-right:10px; }
  #inspector:modal .archive-folder-index b { font-size:13px; }
  .immersive #inspector:modal .rail-head { flex-basis:47px; padding-inline:9px; }
  #inspector:modal .archive-brand { gap:6px; }
  #inspector:modal .archive-mark { flex-basis:30px; height:30px; }
  #inspector:modal .archive-mark svg { width:20px; height:20px; }
  #inspector:modal .archive-kicker { display:none; }
  .immersive #inspector:modal #inspector-title { margin:0; font:600 12px/1 var(--mono); }
  .archive-controls { gap:4px; }
  .immersive #inspector:modal .archive-action { width:44px; height:44px; padding:0; }
  #inspector:modal .archive-action-label,#inspector:modal .dossier-tabs i { display:none; }
  .immersive #inspector:modal #detail {
    --page-rule-x:8px; padding:14px 12px 21px 16px;
    background:var(--folder-grain),linear-gradient(90deg,transparent 8px,#87433259 8px 9px,transparent 9px),
      var(--paper-patina),var(--archive-paper);
  }
  #inspector:modal .dossier-heading { margin-bottom:11px; padding-bottom:8px; }
  #inspector:modal .dossier-id { margin-bottom:8px; gap:4px 8px; padding-block:4px; }
  #inspector:modal .dossier-folio { display:none; }
  #inspector:modal #dossier-heading { font-size:clamp(30px,8.4vw,45px); }
  .dossier-head-meta { gap:4px 10px; }
  .dossier-assessment { margin:7px 0 1px; }
  .dossier-stamp { margin:0; transform:rotate(-1deg); }
  #inspector:modal .small-action { min-height:42px; }
  #inspector:modal .dossier-actions { gap:5px; margin-top:6px; }
  #inspector:modal .dossier-actions .small-action { padding-inline:7px; }
  #inspector:modal .dossier-action-compact,#inspector:modal #dossier-open-attachment { display:inline-block; }
  #inspector:modal .dossier-action-full { display:none; }
  #inspector:modal .research-summary { padding:6px 9px 9px; margin-bottom:10px; }
}
@media(max-width:360px) {
  #inspector:modal .archive-spine { padding-inline:7px; }
  #inspector:modal .archive-page-stack { margin-inline:7px 11px; }
  .immersive #inspector:modal #detail { padding-inline:13px 9px; }
  #inspector:modal .dossier-tabs button { gap:4px; }
  #inspector:modal .dossier-tabs span { padding-inline:2px; }
  #inspector:modal .dossier-document:not([data-page=reading]) #dossier-heading {
    font-size:clamp(23px,8.15vw,29px);
  }
}
@media(max-width:440px) {
  #inspector:modal .research-summary[data-compact-summary]:not(.summary-expanded) p {
    display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:5; overflow:hidden;
  }
  #inspector:modal #dossier-summary-toggle {
    display:inline-flex; align-items:center; min-height:30px; margin:1px 0 -2px;
    padding:0 2px 0 0; border:0; background:none; color:#733d29;
    font:600 11px/1.15 var(--archive-type); text-decoration:underline; text-underline-offset:3px;
  }
}
@media(max-width:440px) and (max-height:715px) {
  #inspector:modal .archive-folder { --folder-tab:0px; }
  #inspector:modal .archive-folder-index { display:none; }
  .immersive #inspector:modal #detail { padding-top:9px; }
  #inspector:modal .dossier-heading { margin-bottom:8px; }
  #inspector:modal .dossier-document[data-page=reading] #dossier-heading { font-size:clamp(25px,7.5vw,33px); }
  #inspector:modal .dossier-head-meta { margin-top:3px; }
  #inspector:modal .dossier-stamp { padding-block:4px; }
  #inspector:modal .research-summary p { margin-block:4px 0; }
  #inspector:modal .abstract-jump { min-height:27px; }
  #inspector:modal .research-summary[data-compact-summary]:not(.summary-expanded) p {
    -webkit-line-clamp:2;
  }
  #inspector:modal .evidence-tab { padding-block:4px; }
  #inspector:modal .dossier-plate :is(img,svg) { height:46px; }
  #inspector:modal .dossier-plate.has-photo .plate-description { -webkit-line-clamp:2; }
  #inspector:modal .dossier-finding-index { margin-top:5px; padding-block:3px; }
}
@media(max-height:465px) and (orientation:landscape) {
  .immersive #inspector:modal { --folder-gap:6px; }
  #inspector:modal .archive-folder { --folder-tab:0px; }
  #inspector:modal .archive-folder-index { display:none; }
  .immersive #inspector:modal .rail-head { flex-basis:46px; }
  #inspector:modal .archive-page-stack { margin-block-end:13px; }
  .immersive #inspector:modal #detail { padding-block:9px 15px; }
  #inspector:modal #dossier-heading { font-size:clamp(27px,3.85vw,42px); }
  #inspector:modal .dossier-heading { margin-bottom:9px; padding-bottom:6px; }
  #inspector:modal .dossier-id { margin-bottom:5px; padding-block:3px; }
  .dossier-assessment { margin-top:5px; }
  #inspector:modal .dossier-actions { margin-top:5px; }
  #inspector:modal .dossier-stamp { gap:2px; padding-block:3px; }
  #inspector:modal .research-summary { margin-bottom:11px; padding-block:7px 10px; }
  .archive-spine::after { display:none; }
}
@media(min-width:861px) and (max-height:465px) and (orientation:landscape) {
  .archive-spine { gap:9px; padding-top:11px; }
  .spine-label { padding-block:7px; }
  #inspector:modal .archive-page-stack { margin-top:6px; }
}

