:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  color: #e8eee9;
  background: #080b09;
  font-synthesis: none;
  --ink: #e8eee9;
  --muted: #9aa69d;
  --line: #29332c;
  --accent: #32f34b;
  --pale: #112016;
  --mono: "DejaVu Sans Mono", "SFMono-Regular", Consolas, monospace;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-padding-top: 105px;
}
body {
  margin: 0;
}
a {
  color: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  user-select: none;
  min-height: 44px;
  padding: 12px 17px;
  color: var(--ink);
  border: 1px solid #3a493e;
  border-radius: 0;
  background: #0e1510;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.4;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    transform 120ms cubic-bezier(0.23, 1, 0.32, 1);
}
button:active {
  transform: scale(0.98);
  background: #1b2b20;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.primary {
  background: var(--accent);
  color: #061008;
  border-color: var(--accent);
  font-weight: 700;
}
input,
select,
textarea {
  font-size: 16px;
  color: var(--ink);
  background: #0b100d;
  border: 1px solid #3b493f;
  border-radius: 0;
  padding: 12px 14px;
  min-width: 0;
  min-height: 44px;
}
input::placeholder,
textarea::placeholder {
  color: #849288;
  opacity: 1;
}
textarea {
  width: 100%;
  resize: vertical;
  line-height: 1.65;
}
input[type="checkbox"] {
  appearance: auto;
  width: 17px;
  height: 17px;
  min-height: 17px;
  flex-shrink: 0;
  accent-color: var(--accent);
}
input[type="file"] {
  width: 100%;
  max-width: 100%;
  font-size: 13px;
}
input::file-selector-button {
  border: 1px solid #536458;
  background: #1b2920;
  color: var(--ink);
  padding: 8px 12px;
  margin-right: 12px;
  cursor: pointer;
}
.shell {
  max-width: 1600px;
  min-height: 100dvh;
  margin: auto;
}
.sidebar {
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 0 42px;
  min-height: 84px;
  border-bottom: 1px solid var(--line);
  background: #080b09;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.055em;
}
.brand-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}
.local {
  color: var(--accent);
  font: 9px var(--mono);
  letter-spacing: 0.03em;
  border: 1px solid #314637;
  padding: 4px 5px;
  margin: 0 0 0 7px;
}
.tagline {
  display: none;
}
nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  margin-left: auto;
}
nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 19px;
  font: 11px var(--mono);
  text-decoration: none;
  text-transform: uppercase;
  color: #a9b4ac;
  border-left: 1px solid var(--line);
  border-bottom: 2px solid transparent;
}
nav a span:first-child {
  font-size: 9px;
  color: #728a78;
}
nav a[aria-current="page"] {
  color: var(--accent);
  background: #101a12;
  border-bottom-color: var(--accent);
}
nav a[aria-current="page"] span:first-child {
  color: var(--accent);
}
.count:empty {
  display: none;
}
.count {
  background: var(--accent);
  color: #08100a;
  padding: 3px 5px;
  font-size: 10px;
}
.sidebar-bottom {
  border-left: 1px solid var(--line);
  padding-left: 25px;
  color: #a2b2a6;
  font: 9px/1.7 var(--mono);
  text-transform: uppercase;
  flex-shrink: 0;
}
.sidebar-bottom p {
  display: none;
}
.dot,
.signal-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--accent);
  margin-right: 7px;
  vertical-align: middle;
}
main {
  max-width: 1370px;
  min-width: 0;
  margin: auto;
  padding: 24px 42px 38px;
}
main > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 0 22px;
  font: 9px/1.6 var(--mono);
  color: #94a198;
  letter-spacing: 0.035em;
}
#connection {
  color: #b0c4b5;
  text-align: right;
}
.eyebrow {
  font-weight: 400;
}
h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}
h1 {
  margin: 0 0 16px;
  font: 42px/1.13 var(--mono);
  font-weight: 400;
  letter-spacing: -0.065em;
  text-transform: uppercase;
}
h2 {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
}
h3 {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  margin: 0 0 10px;
  letter-spacing: -0.015em;
}
p {
  line-height: 1.65;
}
.muted,
.description {
  font-size: 14px;
  color: var(--muted);
}
.description {
  margin: 0;
  max-width: 680px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.research-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  border: 1px solid var(--line);
  margin: 0 0 46px;
  background: #0b100c;
  overflow: hidden;
}
.hero-copy {
  padding: 34px 36px 36px;
  z-index: 1;
}
.section-code {
  color: #98b59f;
  font: 9px/1.6 var(--mono);
  letter-spacing: 0.06em;
  margin: 0 0 23px;
}
.hero-copy h1 {
  color: var(--ink);
  font-size: clamp(48px, 5.45vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.075em;
  margin: 0 0 21px;
}
.hero-copy h1 span {
  color: var(--accent);
}
.hero-description {
  font-size: 14px;
  line-height: 1.75;
  color: #a2b0a7;
  max-width: 340px;
  margin: 0 0 25px;
}
.hero-copy .primary {
  min-width: 202px;
  text-align: left;
  padding: 15px 20px;
  font-size: 11px;
}
.hero-field {
  position: relative;
  border-left: 1px solid var(--line);
  min-width: 0;
  display: flex;
  align-items: center;
  background-image:
    linear-gradient(#263e2d40 1px, transparent 1px),
    linear-gradient(90deg, #263e2d40 1px, transparent 1px);
  background-size: 25% 25%;
}
.hero-field::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 25%;
  background: #32f34b0b;
  border-left: 1px solid #32f34b19;
  border-right: 1px solid #32f34b19;
}
.hero-field img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  min-height: 300px;
  object-fit: contain;
}
.field-label {
  position: absolute;
  color: #8aa995;
  font: 8px/1.6 var(--mono);
  letter-spacing: 0.05em;
  z-index: 1;
}
.field-label-top {
  top: 20px;
  left: 20px;
}
.field-label-bottom {
  bottom: 18px;
  right: 20px;
  text-align: right;
}
.hero-index {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-column: 1/-1;
  border-top: 1px solid var(--line);
}
.hero-index a {
  text-decoration: none;
  padding: 18px 24px;
  min-width: 0;
  border-right: 1px solid var(--line);
  transition: background-color 140ms ease;
}
.hero-index a:last-child {
  border-right: 0;
}
.hero-index a > span:first-child {
  display: block;
  font: 8px var(--mono);
  color: var(--accent);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}
.hero-index a > span:last-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #c6d0c9;
}
.hero-index b {
  font-size: 18px;
  font-weight: 400;
  color: var(--accent);
}
.library-heading {
  border: 0;
  margin-bottom: 0;
  padding: 0 0 22px;
}
.library-heading .section-code {
  margin-bottom: 8px;
}
.library-heading h2 {
  margin: 0;
  font: 29px var(--mono);
  text-transform: uppercase;
  letter-spacing: -0.06em;
}
.library-note {
  font: 8px/1.6 var(--mono);
  color: #82948a;
  text-align: right;
}
.card {
  padding: 26px;
  background: #0c120e;
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.welcome {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #101a13;
  border-left: 2px solid #476e50;
}
.welcome .mark {
  font: 32px var(--mono);
  color: var(--accent);
  flex-shrink: 0;
}
.welcome h2 {
  font-size: 16px;
}
.welcome p {
  font-size: 12px;
  margin: 9px 0;
  max-width: 950px;
  color: #9eafa4;
}
.welcome button {
  margin-top: 7px;
  background: transparent;
  color: var(--accent);
  border-color: #35563d;
}
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.toolbar input {
  flex: 1;
  min-width: 180px;
}
.toolbar input[type="checkbox"] {
  flex: 0 0 17px;
  min-width: 17px;
}
.toolbar select {
  max-width: 100%;
  font-size: 12px;
}
.discovery-toolbar {
  align-items: flex-end;
}
.discovery-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.discovery-topic {
  flex: 1 1 320px;
}
.discovery-year {
  flex: 0 1 160px;
}
.discovery-access {
  flex: 0 1 210px;
}
.discovery-field .field-label {
  color: var(--muted);
  font: 11px var(--mono);
}
.discovery-toolbar .discovery-field input,
.discovery-toolbar .discovery-field select {
  width: 100%;
  min-width: 0;
}
.discovery-toolbar > .inline-label {
  min-height: 44px;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .discovery-toolbar .discovery-field {
    flex: 1 1 100%;
  }
}
.stats {
  display: flex;
  color: var(--muted);
  font: 10px var(--mono);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats > span {
  padding: 16px 28px 16px 0;
  margin-right: 28px;
  border-right: 1px solid var(--line);
}
.stats > span:last-child {
  border-right: 0;
}
.stats strong {
  color: var(--accent);
  font-size: 16px;
  font-weight: 400;
  margin-right: 8px;
}
.reference {
  display: flex;
  gap: 18px;
  padding: 25px 22px;
  background: #0a100c;
  border: 1px solid var(--line);
  border-top: 0;
  overflow-wrap: anywhere;
}
.reference input[type="checkbox"] {
  margin: 6px 0;
}
.reference-body {
  flex: 1;
  min-width: 0;
}
.meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  margin: 0;
}
.reference .actions {
  margin-top: 14px;
}
.reference button {
  padding: 8px 12px;
  font-size: 10px;
}
.actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.badge {
  display: inline-block;
  padding: 5px 8px;
  margin: 10px 7px 0 0;
  border: 1px solid #2c5236;
  color: #b2d1b9;
  background: #122318;
  font: 9px/1.3 var(--mono);
}
.badge.neutral {
  color: #b3beb6;
  background: #151d17;
  border-color: #36433a;
}
.empty {
  position: relative;
  text-align: center;
  padding: 45px 24px;
  border: 1px solid var(--line);
  border-top: 0;
  background: #0a100c;
  margin: 0 0 25px;
}
.empty .symbol {
  font: 30px var(--mono);
  color: var(--accent);
  margin-bottom: 15px;
}
.empty h2 {
  font-size: 20px;
}
.empty p {
  max-width: 480px;
  margin: 12px auto 22px;
  color: var(--muted);
  font-size: 13px;
}
.empty button {
  background: transparent;
  border-color: #3b5f44;
  color: var(--accent);
}
.selection {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px;
  background: #132319;
  border: 1px solid #395a43;
  margin: 18px 0;
}
.selection strong {
  font: 11px var(--mono);
  margin-right: auto;
  color: var(--accent);
}
.selection select {
  max-width: 100%;
  font-size: 12px;
}
label {
  display: grid;
  gap: 9px;
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 18px;
  line-height: 1.6;
}
.inline-label {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 32px;
}
.inline-label input {
  width: auto;
}
.approval-form {
  max-width: 760px;
}
.approval-form .row {
  display: flex;
  gap: 16px;
}
.approval-form .row label {
  flex: 1;
  min-width: 0;
}
.danger {
  color: #ffaaa1;
}
.status-line {
  font: 11px/1.7 var(--mono);
  color: #a0d8ac;
}
.request {
  border-left: 2px solid var(--accent);
}
.subtle-link {
  color: #a0edaf;
  font-size: 12px;
  text-underline-offset: 4px;
}
.help-list {
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.9;
  color: #b8c4bc;
}
.code {
  font: 12px/1.8 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 16px;
  background: #101a13;
  border: 1px solid var(--line);
}
footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: #8d9c92;
  font: 9px/1.9 var(--mono);
  max-width: 100%;
}
#notice {
  position: sticky;
  top: 12px;
  padding: 15px 18px;
  background: #14271a;
  color: #c6f0cf;
  border: 1px solid #4a7855;
  margin-bottom: 20px;
  font-size: 13px;
  z-index: 3;
}
#notice.error {
  background: #2b1716;
  color: #ffd4cd;
  border-color: #8b514a;
}
dialog {
  color: var(--ink);
  background: #0e1711;
  padding: 30px;
  width: min(670px, calc(100% - 28px));
  max-height: 90dvh;
  overflow: auto;
  border: 1px solid #4b6553;
  border-radius: 0;
  box-shadow: 0 25px 100px #0009;
}
dialog::backdrop {
  background: #020604c9;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.dialog-heading h2 {
  margin: 0;
  font: 17px var(--mono);
  letter-spacing: -0.05em;
  text-transform: uppercase;
}
.dialog-heading button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 22px;
  min-width: 44px;
}
#export-text {
  font: 12px/1.9 var(--mono);
  margin-bottom: 16px;
}
.skip {
  position: absolute;
  left: 15px;
  top: -100px;
  padding: 12px;
  color: #070d08;
  background: var(--accent);
  z-index: 10;
}
.skip:focus {
  top: 10px;
}
[hidden] {
  display: none !important;
}
.collections-card {
  margin-top: 30px;
}
.collection-row {
  margin: 12px 0;
  justify-content: flex-end;
}
.collection-row > span {
  margin-right: auto;
}
.year-input {
  max-width: 150px;
}
.citation-options {
  margin-bottom: 16px;
}
.sign-in {
  max-width: 720px;
  margin: 65px auto;
  border-top: 2px solid var(--accent);
  padding: 36px;
  background-image: linear-gradient(
    90deg,
    transparent 49.9%,
    #24382b30 50%,
    transparent 50.1%
  );
}
.sign-in h1 {
  font-size: 38px;
}
.sign-in form {
  margin: 28px 0 12px;
}
.sign-in p {
  overflow-wrap: anywhere;
}
#pdf-import-status {
  overflow-wrap: anywhere;
}
@media (hover: hover) and (pointer: fine) {
  button:hover {
    background: #1a2a1f;
    border-color: #688d72;
  }
  .primary:hover {
    background: #7bff8d;
    border-color: #7bff8d;
    color: #061008;
  }
  nav a:hover,
  .hero-index a:hover {
    color: var(--accent);
    background: #142219;
  }
  .subtle-link:hover {
    color: var(--accent);
  }
}
@media (max-width: 1100px) {
  .sidebar {
    padding: 0 25px;
    gap: 20px;
  }
  nav a {
    padding: 0 13px;
    font-size: 10px;
  }
  .sidebar-bottom {
    display: none;
  }
  main {
    padding-left: 25px;
    padding-right: 25px;
  }
  .hero-copy {
    padding: 30px;
  }
  .hero-copy h1 {
    font-size: 58px;
  }
}
@media (max-width: 760px) {
  html {
    scroll-padding-top: 18px;
  }
  .sidebar {
    flex-wrap: wrap;
    padding: calc(20px + env(safe-area-inset-top)) 20px 0;
    gap: 20px;
  }
  .brand {
    font-size: 24px;
  }
  .tagline {
    display: block;
    margin: 0 0 0 auto;
    font: 8px var(--mono);
    color: var(--muted);
  }
  nav {
    width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }
  nav a {
    justify-content: center;
    padding: 13px 4px;
    gap: 5px;
    font-size: 9px;
    border-top: 1px solid var(--line);
    border-left: 0;
    white-space: nowrap;
  }
  nav a span:first-child {
    display: none;
  }
  main {
    padding: 20px 20px calc(28px + env(safe-area-inset-bottom));
  }
  main > header {
    font-size: 8px;
    gap: 12px;
  }
  .eyebrow {
    max-width: 145px;
  }
  .research-hero {
    grid-template-columns: 1fr;
    margin-bottom: 32px;
  }
  .hero-copy {
    padding: 26px;
  }
  .hero-copy h1 {
    font-size: clamp(42px, 10vw, 65px);
  }
  .hero-description {
    font-size: 13px;
    max-width: 320px;
  }
  .hero-field {
    min-height: 210px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .hero-field img {
    height: 225px;
    min-height: 0;
    object-fit: contain;
  }
  .field-label {
    font-size: 7px;
  }
  .field-label-top {
    top: 12px;
    left: 15px;
  }
  .field-label-bottom {
    bottom: 12px;
    right: 15px;
  }
  .hero-index a {
    padding: 14px 11px;
  }
  .hero-index a > span:first-child {
    font-size: 7px;
    margin-bottom: 8px;
  }
  .hero-index a > span:last-child {
    font-size: 10px;
    line-height: 1.5;
    align-items: flex-end;
    gap: 5px;
  }
  .hero-index b {
    font-size: 14px;
  }
  h1 {
    font-size: 34px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 15px;
  }
  .page-heading > button {
    flex-shrink: 0;
  }
  .library-heading h2 {
    font-size: 25px;
  }
  .library-note {
    max-width: 115px;
    font-size: 7px;
  }
  .section-code {
    font-size: 8px;
  }
  .welcome {
    padding: 20px;
  }
  .welcome .mark {
    display: none;
  }
  .welcome p {
    font-size: 12px;
  }
  .card {
    padding: 20px;
  }
  .stats > span {
    padding-right: 18px;
    margin-right: 18px;
    font-size: 9px;
  }
  .toolbar {
    gap: 8px;
  }
  .toolbar input {
    min-width: 100%;
  }
  .toolbar select {
    flex: 1;
  }
  .reference {
    padding: 22px 16px;
    gap: 12px;
  }
  h3 {
    font-size: 16px;
  }
  .approval-form .row {
    display: block;
  }
  .sign-in {
    padding: 24px;
    margin: 30px auto;
  }
  .sign-in h1 {
    font-size: 29px;
  }
  dialog {
    padding: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
  button:active {
    transform: none;
  }
}

/* The image reserves layout space and remains the no-canvas fallback. */
.field-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-field[data-ready="true"] > img {
  opacity: 0;
}
.field-motion {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  min-height: 36px;
  min-width: 78px;
  padding: 8px 10px;
  background: #0b160ed9;
  border-color: #36533e;
  color: #b5d9bf;
  font-size: 8px;
}
.field-motion:disabled {
  cursor: default;
  opacity: 0.7;
}
.field-label-top {
  max-width: calc(100% - 125px);
}
@media (max-width: 760px) {
  .field-motion {
    top: 7px;
    right: 7px;
    min-height: 44px;
    min-width: 75px;
  }
}
#reader {
  width: min(980px, calc(100% - 28px));
}
.reader-privacy {
  color: #9ac5a5;
  font: 10px/1.8 var(--mono);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
#reader-controls {
  align-items: flex-end;
  margin-bottom: 20px;
}
#reader-controls label {
  flex: 1;
  margin: 0;
  min-width: 150px;
}
.reader-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.reader-section-heading,
.reader-status {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}
.reader-section-heading h3 {
  margin: 0 auto 0 0;
}
.reader-copy {
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.85;
  color: #d1dbd4;
}
.reader-warning {
  color: #d7c99f;
  font-size: 12px;
  line-height: 1.7;
}
.diagnostics {
  margin-top: 18px;
}
.diagnostic-row {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 7px;
  font: 11px/1.7 var(--mono);
}
#bibliography-import-status {
  overflow-wrap: anywhere;
  font-size: 13px;
}
#bibliography-import-status ul {
  max-height: 180px;
  overflow: auto;
  padding-left: 20px;
}
@media (max-width: 760px) {
  #reader-controls label {
    min-width: 100%;
  }
}
