/* Restriktioner, en temasida av Nadeschda Barenje */

body {
  background: #0b0d12;
  margin: 0;
  padding: 24px 12px 60px;
}

.wrap {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Fönstrens innehåll är vitt (hardcopy.css), så texten måste vara mörk */
.window-body { font-size: 15px; line-height: 1.7; color: #111; }
.window-body h1 { font-size: 28px; margin: 0 0 4px; color: #111; }
.window-body h2 { font-size: 19px; margin: 0 0 8px; color: #111; }
.window-body p { font-size: 15px; line-height: 1.7; color: #111; margin: .7em 0; }
.window-body .material { color: #555; font-style: italic; margin: 0 0 12px; font-size: 13px; }
.window-body a { color: #0000ff; }

.intro p { max-width: 64ch; }

/* Verk-rutnät. Bilderna behåller alltid sitt eget bildförhållande.
   max-height:none tar bort hardcopy-cappen på 300px, som annars
   tillsammans med width:100% klämde ihop höga bilder på höjden.
   Ojämn höjd är OK, förvrängning är det aldrig. */
.works {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
.work { margin: 0; display: flex; flex-direction: column; }
.work img {
  width: 100%;
  height: auto;
  max-height: none;
  border: 2px inset #808080;
  background: #f4f4f4;
  display: block;
}
.work figcaption {
  font-size: 12.5px;
  line-height: 1.45;
  margin-top: 6px;
  color: #333;
  font-style: normal;
}
.work figcaption b { color: #000; }

.works.single { grid-template-columns: 1fr; }

/* 3D-visare för grisnos-modellen */
#viewer-container {
  position: relative;
  width: 100%;
  height: 520px;
  background: #15161a;
  border: 1px solid #808080;
  margin: 6px 0;
}
#viewer-container canvas { display: block; max-width: 100%; }
#loading {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: #cfd3d8; font-size: 13px; letter-spacing: 0.04em;
}
.controls-bar {
  display: flex; flex-wrap: wrap; gap: 8px;
  align-items: center; justify-content: space-between;
  margin: 2px 0 10px;
}
.hint { font-size: 11px; color: #555; }
.control-buttons { display: flex; gap: 6px; }
.btn {
  font-family: inherit; font-size: 12px; padding: 4px 10px;
  background: #c0c0c0; border: 2px outset #dfdfdf; cursor: pointer;
}
.btn:active { border-style: inset; }

@media (max-width: 640px) {
  .works { grid-template-columns: 1fr; }
  #viewer-container { height: 380px; }
}
