/* faytell · the perfume desk: a night laboratory, 1950s-60s, where alchemy meets the spectroscope.
   Enamel, chrome, bakelite, glass apparatus, a cathode-ray readout, amber light. Text first. */
:root {
  --night: #0b0e12; --enamel: #1b2127; --enamel-2: #222a31; --enamel-line: rgba(220, 230, 240, .08);
  --chrome: linear-gradient(180deg, #e8edf0 0%, #9aa3ab 38%, #59626a 62%, #c9d0d5 100%);
  --bakelite: #2b1a12; --bakelite-2: #3d2518;
  --paper: #e9e2d3; --paper-edge: #d9cfbc;
  --ink: #221c18; --ink-soft: #4d433b; --ink-dim: #7a6e63;
  --bone: rgba(236, 231, 216, .88); --bone-dim: rgba(196, 192, 180, .62);
  --amber: #ffb54d; --brass: #8a6a3d;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --label: Futura, "Century Gothic", "Avenir Next", Avenir, "Trebuchet MS", "DejaVu Sans", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--night); }
body {
  margin: 0; min-height: 100vh; font-family: var(--serif); color: var(--bone); -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(ellipse 55% 40% at 16% -4%, rgba(255, 181, 77, .14), transparent 70%),
    radial-gradient(ellipse 120% 70% at 50% 120%, rgba(0, 0, 0, .6), transparent 60%),
    linear-gradient(var(--enamel-line) 1px, transparent 1px) 0 0 / 26px 26px,
    linear-gradient(90deg, var(--enamel-line) 1px, transparent 1px) 0 0 / 26px 26px,
    var(--night);
  padding: clamp(18px, 4vw, 52px) 16px 40px;
}
a { color: inherit; text-decoration-color: rgba(255, 181, 77, .45); text-underline-offset: 3px; }
a:hover, a:focus-visible { color: #ffd9a8; outline: none; }
.dim { color: var(--bone-dim); }
.kicker { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 10px; font: 11px/1.4 var(--label); letter-spacing: .3em; text-transform: uppercase; color: var(--brass); }
.standfirst { font-style: italic; font-size: clamp(16px, 2.1vw, 19px); line-height: 1.5; margin: 0 0 22px; }
.desk-foot { text-align: center; margin: 28px 0 0; font: 12px var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--bone-dim); }
.desk-foot a { text-decoration: none; }
/* enamel label plates */
.tagplate { display: inline-block; font: 600 11px/1 var(--label); letter-spacing: .26em; text-transform: uppercase; color: #1c1814; background: #e4dccb; padding: 7px 14px 6px; border-radius: 4px; box-shadow: inset 0 0 0 2px #e4dccb, inset 0 0 0 3px rgba(28, 24, 20, .5), 0 2px 6px rgba(0, 0, 0, .5); }
/* the spectral strip: a band of colour crossed by dark absorption lines (spectral analysis of a compound) */
.spectrum { height: 10px; border-radius: 2px; margin: 26px 0; opacity: .8;
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(0,0,0,.85) 12% 12.6%, transparent 12.6% 31%, rgba(0,0,0,.8) 31% 31.4%, transparent 31.4% 47%, rgba(0,0,0,.9) 47% 48.1%, transparent 48.1% 63%, rgba(0,0,0,.75) 63% 63.4%, transparent 63.4% 77%, rgba(0,0,0,.85) 77% 77.7%, transparent 77.7% 89%, rgba(0,0,0,.7) 89% 89.3%, transparent 89.3%),
    linear-gradient(90deg, #3a1d55, #2f3f8f 14%, #2d7f8a 30%, #5f9a4a 44%, #c8b545 56%, #d8893a 68%, #b2412f 84%, #4a1717);
  filter: saturate(.7) brightness(.85); }

/* the one mark for every link that leaves Faytell */
a.out .pw { display: inline-flex; align-items: baseline; gap: 3px; margin-left: .35em; font-size: .72em; font-style: italic; letter-spacing: .06em; opacity: .72; white-space: nowrap; }
a.out .pw svg { width: .8em; height: .8em; align-self: center; }
a.out { text-decoration-style: dotted; }

/* ------------------------------------------------------------------ the laboratory desk */
.lab { max-width: 1040px; margin: 0 auto; }
.lab-head { max-width: 680px; }
.lab-head h1 { font-weight: 400; font-size: clamp(30px, 5vw, 46px); letter-spacing: .02em; margin: 0 0 8px; }
.instruments { display: block; width: 100%; height: auto; margin: 8px 0 -4px; }
.bench { position: relative; background: linear-gradient(180deg, var(--enamel-2), var(--enamel)); border-radius: 6px; padding: 30px clamp(18px, 4vw, 40px) 34px;
  box-shadow: 0 26px 50px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06); }
.bench::before { content: ''; position: absolute; left: 0; right: 0; top: -7px; height: 7px; border-radius: 4px 4px 0 0; background: var(--chrome); opacity: .85; }
.tome-on-desk { display: flex; gap: clamp(20px, 5vw, 56px); align-items: center; flex-wrap: wrap; margin: 6px 0 8px; }
.book { position: relative; display: block; width: 200px; height: 276px; text-decoration: none; transform: rotate(-3deg); transition: transform .8s ease; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .7)); }
.book:hover, .book:focus-visible { transform: rotate(-1deg) translateY(-4px); }
.book .spine { position: absolute; left: 0; top: 0; bottom: 0; width: 16px; border-radius: 3px 0 0 3px; background: linear-gradient(90deg, #241510, #3a2219 60%, #241510); }
.book .cover { position: absolute; left: 14px; right: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; padding: 30px 20px; display: flex; flex-direction: column; justify-content: center; gap: 14px; text-align: center;
  background: radial-gradient(ellipse at 30% 22%, rgba(255, 255, 255, .07), transparent 60%), repeating-linear-gradient(45deg, rgba(0,0,0,.08) 0 2px, transparent 2px 5px), #34201a;
  border: 1px solid rgba(255, 181, 77, .2); box-shadow: inset 0 0 0 7px #34201a, inset 0 0 0 8px rgba(255, 181, 77, .38); }
.book .c-kicker { font: 10px var(--label); letter-spacing: .26em; text-transform: uppercase; color: rgba(255, 196, 120, .62); }
.book .c-title { font-size: 25px; line-height: 1.15; color: #f0d3a2; letter-spacing: .03em; }
.book .c-count { font-size: 12px; font-style: italic; color: rgba(240, 211, 162, .7); }
.book .ribbon { position: absolute; right: 34px; bottom: -26px; width: 14px; height: 52px; background: linear-gradient(#b8501f, #8e3714); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); }
.book-notes { max-width: 440px; line-height: 1.6; }
.book-notes .latest a { text-decoration: none; border-bottom: 1px solid rgba(255, 181, 77, .35); }
.shelf-wrap { margin-top: 30px; }
.shelf-wrap .sub { margin: 10px 0 0; font-size: 14px; }

/* the bobblehead shelf: porcelain figurines on spring necks; they nod when the cursor passes */
.specimens { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 30px 20px; }
.specimens li { position: relative; padding-bottom: 12px; }
.specimens li::after { content: ''; position: absolute; left: -10px; right: -10px; bottom: 0; height: 6px; border-radius: 2px; background: var(--chrome); opacity: .55; box-shadow: 0 6px 10px rgba(0, 0, 0, .5); }
.bobble { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--bone); }
.bobble .fig { display: flex; flex-direction: column; align-items: center; height: 150px; justify-content: flex-end; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .55)); }
.bobble .head { display: block; width: 86px; height: 86px; transform-origin: 50% 96%; position: relative; z-index: 1; }
.bobble .head svg { width: 100%; height: 100%; display: block; }
.bobble .spring { width: 9px; height: 13px; margin-top: -6px; background: repeating-linear-gradient(180deg, #c9d0d5 0 2px, #59626a 2px 4px); border-radius: 2px; }
.bobble .torso { width: 42px; height: 30px; border-radius: 18px 18px 5px 5px; box-shadow: inset 0 -6px 8px rgba(0, 0, 0, .25), inset 0 4px 4px rgba(255, 255, 255, .12); }
.bobble .base { position: relative; width: 66px; height: 18px; border-radius: 5px 5px 3px 3px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .1), inset 0 -4px 6px rgba(0, 0, 0, .4); }
.bobble .base .plate { position: absolute; left: 14px; right: 14px; top: 6px; height: 6px; border-radius: 2px; background: var(--chrome); opacity: .7; }
.bobble:hover .head, .bobble:focus-visible .head { animation: nod 1.7s cubic-bezier(.3, 0, .2, 1) both; }
@keyframes nod { 0% { transform: rotate(0); } 12% { transform: rotate(10deg) translateY(3px); } 28% { transform: rotate(-8deg); } 44% { transform: rotate(5deg) translateY(1px); } 60% { transform: rotate(-3deg); } 78% { transform: rotate(1.5deg); } 100% { transform: rotate(0); } }
@media (prefers-reduced-motion: reduce) { .bobble:hover .head, .bobble:focus-visible .head { animation: none; transform: rotate(4deg); } }
.bobble .tag { margin-top: 12px; text-align: center; }
.bobble .tag-text { display: block; }
.bobble .nm { display: block; font-size: 15.5px; line-height: 1.25; }
.bobble .hd { display: block; font: 11px var(--label); letter-spacing: .08em; color: var(--brass); margin: 3px 0 5px; }
.bobble .ln { display: block; font-size: 12.5px; line-height: 1.42; color: var(--bone-dim); font-style: italic; }
.bobble.out .pw { margin: 6px 0 0; justify-content: center; display: flex; }
.bobble:hover .nm, .bobble:focus-visible .nm { color: #ffd9a8; }
.bobble.empty .head { border: 1px dashed rgba(236, 231, 216, .22); border-radius: 50%; }
.bobble.empty .torso { border: 1px dashed rgba(236, 231, 216, .16); }
.bobble.empty .base { background: rgba(61, 37, 24, .5); }

/* ------------------------------------------------------------------ paper sheets: contents and chapters */
.sheet { max-width: 46rem; margin: 0 auto; padding: clamp(26px, 5vw, 58px) clamp(20px, 6vw, 64px) clamp(30px, 5vw, 56px); color: var(--ink);
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, .35), transparent 65%), var(--paper);
  border-radius: 2px; box-shadow: 0 24px 50px rgba(0, 0, 0, .6), inset 0 0 70px rgba(120, 90, 50, .14); }
.sheet .kicker { color: var(--brass); }
.sheet { position: relative; }
.sheet::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: 2px 2px 0 0; opacity: .55;
  background: linear-gradient(90deg, transparent 0 22%, rgba(0,0,0,.8) 22% 22.6%, transparent 22.6% 58%, rgba(0,0,0,.8) 58% 58.8%, transparent 58.8%), linear-gradient(90deg, #3a1d55, #2f3f8f 14%, #2d7f8a 30%, #5f9a4a 44%, #c8b545 56%, #d8893a 68%, #b2412f 84%, #4a1717); }
.sheet a { text-decoration-color: rgba(138, 106, 61, .5); }
.sheet .dim { color: var(--ink-dim); }
.sheet a:hover, .sheet a:focus-visible { color: #6b3f12; }
.sheet h1 { font-weight: 700; font-size: clamp(30px, 5.4vw, 44px); line-height: 1.02; letter-spacing: -.01em; margin: 0 0 12px; }
.sheet .standfirst { color: var(--ink-soft); }
.contents .toc { list-style: none; padding: 0; margin: 26px 0 28px; border-top: 1px solid var(--paper-edge); }
.contents .toc li a { display: grid; grid-template-columns: 44px 1fr auto 14px; gap: 14px; align-items: baseline; padding: 15px 4px; border-bottom: 1px solid var(--paper-edge); text-decoration: none; }
.contents .toc .cn { font-size: 13px; letter-spacing: .14em; color: var(--brass); }
.contents .toc .cp { display: block; font-size: 19px; }
.contents .toc .ct { display: block; font-style: italic; color: var(--ink-soft); font-size: 15px; }
.contents .toc .cd { font-size: 12px; color: var(--ink-dim); white-space: nowrap; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; align-self: center; }
li.unread .unread-dot { background: #d9861f; box-shadow: 0 0 8px rgba(255, 160, 50, .7); }
.contents .take { font-size: 15px; }

.ch-nav { font-family: var(--label); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; letter-spacing: .06em; color: var(--ink-dim); margin: -6px 0 26px; }
.ch-nav:last-of-type { margin: 34px 0 -6px; }
.ch-nav a { text-decoration: none; }
.print-btn { font: inherit; font-size: 12px; letter-spacing: .08em; color: var(--ink-soft); background: none; border: 1px solid var(--paper-edge); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.print-btn:hover { border-color: var(--brass); color: var(--ink); }

.chapter .ch-head h1 { margin-bottom: 14px; }
.chapter .portrait { float: right; width: min(42%, 240px); margin: 4px 0 18px 26px; }
.chapter .portrait img { width: 100%; height: auto; display: block; }
.chapter figcaption { font-size: 11.5px; line-height: 1.45; color: var(--ink-dim); margin-top: 6px; font-style: italic; }
.ch-body { font-size: 17.5px; line-height: 1.68; text-align: left; hyphens: auto; }
.ch-body p { margin: 0 0 1em; }
.ch-body > p:first-child::first-letter { float: left; font-size: 3.4em; line-height: .86; font-weight: 700; margin: .06em .08em 0 0; }
.ch-body h2 { font-size: 21px; margin: 1.6em 0 .5em; line-height: 1.2; }
.pull { margin: 1.4em 0 1.5em; padding: 0 0 0 20px; border-left: 2px solid var(--brass); }
.pull p { font-size: 22px; line-height: 1.35; font-style: italic; margin: 0 0 8px; }
.pull p::before { content: '\201C'; } .pull p::after { content: '\201D'; }
.pull footer { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); }
.ch-side { clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 30px; }
.ch-side h3 { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--brass); margin: 0 0 10px; }
.ch-side section { background: rgba(120, 90, 50, .08); border-radius: 6px; padding: 16px 18px; }
.years ol { list-style: none; padding: 0; margin: 0; font-size: 14px; line-height: 1.45; }
.years li { display: grid; grid-template-columns: 66px 1fr; gap: 10px; margin-bottom: 7px; }
.years b { color: var(--brass); font-weight: 600; font-size: 13px; }
.years-note { font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); margin: 10px 0 0; }
.four ul { list-style: none; padding: 0; margin: 0; }
.four li { margin-bottom: 11px; font-size: 14px; line-height: 1.4; }
.four .t { display: block; font-weight: 700; }
.four .m { display: block; font-size: 12px; color: var(--ink-dim); font-style: italic; }
.four .n { display: block; color: var(--ink-soft); }
.still { grid-column: 1 / -1; margin: 0; }
.still img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; border-radius: 6px; }
.ch-foot { margin-top: 26px; border-top: 1px solid var(--paper-edge); padding-top: 14px; font-size: 13px; color: var(--ink-dim); }
.ch-foot .series { font-style: italic; margin: 0 0 10px; }
.sources summary { cursor: pointer; letter-spacing: .12em; text-transform: uppercase; font-size: 11px; }
.sources ul { padding-left: 18px; line-height: 1.6; }
@media (max-width: 620px) {
  .chapter .portrait { float: none; width: 62%; margin: 6px auto 18px; }
  .ch-side { grid-template-columns: 1fr; }
  .contents .toc li a { grid-template-columns: 34px 1fr 12px; }
  .contents .toc .cd { grid-column: 2; }
}

/* the print book (and the PDF): plain paper, one chapter per sheet run, nothing of the desk */
.print-page { background: var(--paper); color: var(--ink); padding: 0; }
.print-book { max-width: 46rem; margin: 0 auto; padding: 40px 24px; color: var(--ink); }
.print-book .title-page { text-align: center; padding: 18vh 0 10vh; }
.print-book .title-page h1 { font-size: 44px; margin: 0 0 10px; }
.print-book .title-page .toc { list-style: none; padding: 0; margin: 40px auto 0; max-width: 32rem; text-align: left; line-height: 2; }
.print-book .chapter { margin-top: 60px; }
.print-book .chapter h1 { font-size: 36px; margin: 0 0 12px; }
@media print {
  @page { size: A4; margin: 18mm 17mm 20mm; }
  html, body { background: #fff !important; color: #1a1520 !important; padding: 0 !important; }
  .sheet { box-shadow: none; background: #fff; max-width: none; padding: 0; }
  .ch-nav, .desk-foot, .print-btn, .ribbon, .shelf-wrap, .sheet::before { display: none !important; }
  .print-book { padding: 0; max-width: none; }
  .print-book .title-page { padding: 60mm 0 0; break-after: page; }
  .print-book .chapter { break-before: page; margin-top: 0; }
  .ch-body { font-size: 11pt; line-height: 1.5; }
  .pull p { font-size: 14pt; }
  .ch-side { break-inside: avoid; }
  .ch-side section, .still { break-inside: avoid; }
  .sources[open] ul, .sources ul { display: block; }
  .sources summary { list-style: none; }
  a.out { text-decoration: none; }
  a.out .pw { opacity: .6; }
  a { color: inherit; }
}

/* back to the cabin: a small brass porthole, fixed in the top-left corner of every page reached from the laboratory.
   always there, however far you read; it takes you back aboard, into the 3D cabin (/perfume/) */
.cabin-back { position: fixed; z-index: 60; top: max(12px, env(safe-area-inset-top)); left: max(12px, env(safe-area-inset-left));
  display: block; width: 48px; height: 48px; text-decoration: none; color: var(--bone); -webkit-tap-highlight-color: transparent; }
.cabin-back svg { width: 48px; height: 48px; display: block; border-radius: 50%; filter: drop-shadow(0 3px 7px rgba(0, 0, 0, .55)); transition: filter .25s, transform .25s; }
.cabin-back .cb-glass { transition: fill .25s; }
.cabin-back .cb-arrow { transition: stroke .25s; }
.cabin-back .cb-label { font: 600 10px/1 var(--label); letter-spacing: .24em; text-transform: uppercase; color: #1c1814; background: #e4dccb; padding: 7px 11px 6px; border-radius: 4px;
  box-shadow: inset 0 0 0 2px #e4dccb, inset 0 0 0 3px rgba(28, 24, 20, .5), 0 2px 6px rgba(0, 0, 0, .5); position: absolute; left: 58px; top: 50%; opacity: 0; transform: translate(-6px, -50%); transition: opacity .2s, transform .2s; pointer-events: none; white-space: nowrap; }
.cabin-back:hover svg, .cabin-back:focus-visible svg { filter: drop-shadow(0 0 9px rgba(255, 181, 77, .55)) drop-shadow(0 3px 7px rgba(0, 0, 0, .55)); }
.cabin-back:hover .cb-glass, .cabin-back:focus-visible .cb-glass { fill: #2a2416; }
.cabin-back:hover .cb-arrow, .cabin-back:focus-visible .cb-arrow { stroke: #ffd9a8; }
.cabin-back:hover .cb-label, .cabin-back:focus-visible .cb-label { opacity: 1; transform: translate(0, -50%); }
.cabin-back:focus-visible { outline: none; }
.cabin-back:focus-visible svg { box-shadow: 0 0 0 2px var(--amber); }
@media (max-width: 860px) { .cabin-back ~ main { margin-top: 58px; } }
@media (prefers-reduced-motion: reduce) { .cabin-back svg, .cabin-back .cb-label { transition: none; } }
@media print { .cabin-back { display: none !important; } .cabin-back ~ main { margin-top: 0 !important; } }
