/* Table of Chapters (v08): shared poster, wall and element tile. */

:root {
  --wall: #d5ddcc;
  --paper: #fbf8ef;
  --ink: #1d1b17;
  --ink-2: #4a463d;
  --ink-3: #77715f;
  --focus: #1f56c7;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
}

/* Colour families, one per kind, three tones each. */
.k-book { --f0: #f5b9a2; --f1: #f8cdbb; --f2: #f1a78b; --ink-k: #8a321f; }
.k-object { --f0: #f4d672; --f1: #f8e39d; --f2: #efc94f; --ink-k: #6a5107; }
.k-prints { --f0: #a4cdea; --f1: #c3def2; --f2: #8bbfe3; --ink-k: #1c4c72; }
.k-post { --f0: #bcdea0; --f1: #d2e9bf; --f2: #a7d386; --ink-k: #2f5d1f; }
.k-other { --f0: #d4c4ee; --f1: #e3d8f5; --f2: #c4afe7; --ink-k: #4a347e; }
.s0 { --fill: var(--f0); }
.s1 { --fill: var(--f1); }
.s2 { --fill: var(--f2); }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  background-color: var(--wall);
  /* Painted block wall. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='176' height='88'%3E%3Cpath d='M0 1H176M0 45H176M1 0V44M89 44V88' stroke='%23c3ccb8' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-size: 176px 88px;
  overflow-x: hidden;
}

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

a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* The poster: laminated paper taped to the wall. */
.poster {
  position: relative;
  margin: 40px auto 56px;
  width: min(1400px, calc(100% - 64px));
  padding: 44px 48px 36px;
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  border: 1px solid rgba(29, 27, 23, .14);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .6) inset,
    0 2px 3px rgba(20, 18, 12, .12),
    0 26px 40px -26px rgba(20, 18, 12, .55);
}
.poster::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 4px double rgba(29, 27, 23, .82);
  pointer-events: none;
}
.tape {
  position: absolute;
  width: 92px; height: 26px;
  background: rgba(250, 248, 232, .62);
  border: 1px solid rgba(160, 150, 120, .25);
  box-shadow: 0 1px 2px rgba(20, 18, 12, .08);
  pointer-events: none;
  z-index: 7;
}
.tape--tl { top: -8px; left: -22px; transform: rotate(-38deg); }
.tape--tr { top: -8px; right: -22px; transform: rotate(38deg); }
.tape--bl { bottom: -8px; left: -22px; transform: rotate(38deg); }
.tape--br { bottom: -8px; right: -22px; transform: rotate(-38deg); }

/* Element tile. Sizes follow the tile's own width (container units). */
.el {
  position: relative;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
  padding: 0 8px;
  background: var(--fill, #eee);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
}
.el-no {
  position: absolute;
  top: 5px; left: 7px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.el-kind {
  position: absolute;
  top: 6px; right: 7px;
  font-size: 9.5px;
  font-weight: 700;
  font-stretch: 82%;
  letter-spacing: .09em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--ink-k);
}
.el-shells {
  position: absolute;
  right: 7px; top: 30%;
  display: flex;
  flex-direction: column;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  text-align: right;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.el-shells b { font-weight: 600; }
.el-sym {
  margin-top: 20%;
  font-size: 56px;
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.02em;
}
.el-title {
  margin-top: 6%;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.17;
  overflow-wrap: break-word;
  hyphens: manual;
  max-width: 100%;
}
.el-prop {
  margin-top: auto;
  margin-bottom: 9%;
  padding: 6px 0 0;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@supports (font-size: 1cqi) {
  .el-no { font-size: clamp(10px, 9.4cqi, 16px); top: 4cqi; left: 5cqi; }
  .el-kind { font-size: clamp(8px, 6.2cqi, 10.5px); top: 5cqi; right: 5cqi; }
  .el-sym { font-size: clamp(26px, 36cqi, 66px); }
  .el-title { font-size: clamp(10.5px, 8.6cqi, 14.5px); }
  .el-shells { font-size: clamp(9px, 6.4cqi, 11px); right: 5cqi; }
}
/* Small tiles keep number, kind, symbol and title. */
@container (max-width: 131px) {
  .el-shells, .el-prop { display: none; }
  .el-sym { margin-top: 24%; }
  .el-title { margin: 5% 0 10%; }
}
@container (max-width: 100px) {
  .el-kind { letter-spacing: .03em; font-stretch: 72%; }
}
