/* compact.observer. COMPACT's purple night, mint light and brass, on
   period materials: a carved lintel, a vellum scroll on wooden rollers,
   inset writing tablets and a wax seal. One UI face (IM Fell English);
   VT323 only where the Watchers themselves speak in numbers. */

:root {
  --ink: #1b1530;
  --wall: #2a1f4d;
  --paper: #fff6e0;
  /* The hand the scroll is written in. A true chancery script is beautiful
     and unreadable at 16px, and this page asks people to read a price list,
     so the compromise is a period roman cut from the same century as the
     display face: readable at a glance, wrong by a hundred years in nobody's
     eyes but a typographer's. */
  --f-scribe: "EB Garamond", "IM Fell English", Georgia, serif;
  --mint: #8dffbf;
  --teal: #19b3a6;
  --gold: #d4a53c;
  --mustard: #ffc83d;
  --tomato: #ff5a36;
  --pink: #ff4f9a;
  --sepia: #3a2306;
  --vellum-1: #f6e7c1;
  --vellum-2: #e9d29b;
  --f-ui: "IM Fell English", Georgia, serif;
  --f-ja: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --f-cap: "IM Fell English SC", "IM Fell English", Georgia, serif;
  --f-eye: "VT323", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { background: #0d0a1c; }

/* The page is one night. The painting at the top is not a banner stuck on a
 * dark page: its sky carries on down behind the scroll and the page ends on
 * the same mountain. The gradient starts at the colour the painting's own
 * sky ends on, so there is no seam under the hero, and the stars are one
 * small tile at low opacity rather than anything that moves. */
body {
  margin: 0; min-height: 100vh; color: var(--sepia);
  font: 19px/1.5 var(--f-ui);
  background-color: #150f2a;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cg fill='%23fff6e0'%3E%3Ccircle cx='18' cy='42' r='1.1' opacity='.55'/%3E%3Ccircle cx='96' cy='150' r='.8' opacity='.4'/%3E%3Ccircle cx='168' cy='70' r='1.3' opacity='.35'/%3E%3Ccircle cx='214' cy='206' r='.9' opacity='.45'/%3E%3Ccircle cx='128' cy='14' r='.7' opacity='.3'/%3E%3Ccircle cx='52' cy='228' r='1' opacity='.32'/%3E%3Ccircle cx='238' cy='108' r='.7' opacity='.4'/%3E%3Ccircle cx='76' cy='94' r='.6' opacity='.28'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, #2a1f4d 0%, #1d1538 38%, #150f2a 70%, #0d0a1c 100%);
  background-repeat: repeat, no-repeat;
  background-attachment: scroll, fixed;
  overflow-x: hidden;
}

/* The sky is a scene at the top of the page, not wallpaper: the wheel and
 * the summit have to be seen above the lintel, and the scroll comes down
 * over the foot of the mountain.
 *
 * It is a painting now rather than an inline SVG. Two reasons, and the
 * second is the one that mattered: the subject wants aerial depth that
 * gradients cannot give at this size, and the drawing was a composited
 * animation that ran while anybody scrolled. This decodes once.
 *
 * `background-attachment: fixed` is deliberately NOT used. It forces a
 * repaint of a full-screen image on every scroll frame, which is exactly
 * the cost this change was made to avoid, and on iOS it is ignored anyway.
 */
.sky {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: clamp(360px, 48vw, 660px);
  z-index: 0;
  background-image: url("../img/hermon-wheel.jpg");
  background-size: cover;
  background-position: 50% 22%;
  background-repeat: no-repeat;
  pointer-events: none;
  /* The painting dissolves into the page instead of ending on a line.
     A gradient laid over the bottom of it was the first attempt and it
     needed the page's colour at that exact scroll position to match, which
     it never quite did: the result was a dark band across a lighter
     purple. Masking the image itself needs no colour at all, because what
     comes through is the page. */
  -webkit-mask-image: linear-gradient(to bottom, #000 48%, rgba(0,0,0,.55) 76%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 48%, rgba(0,0,0,.55) 76%, transparent 100%);
}

/* The column the scroll hangs in. Its top padding is what lets the painting
 * be seen: the sky is absolute, so without this the lintel and the scroll
 * ride up over the mountain. The sky is a little taller than the padding on
 * purpose, so the foot of the mountain goes behind the scroll rather than
 * stopping at its edge. */
.wrap {
  position: relative;
  z-index: 1;
  width: min(940px, 100% - 32px);
  margin: 0 auto;
  padding: clamp(290px, 40vw, 540px) 0 44px;
}

/* ---------- the title, in the sky ---------- */

/* There was a carved stone slab here and it was wrong twice over.
 *
 * Wrong in execution: the chamfer was a CSS clip-path, and Chrome does not
 * antialias a clip-path, so every corner of it was a staircase. Nothing
 * else on this page has a jagged edge, and a drawn stone with jagged edges
 * is worse than no stone.
 *
 * Wrong in kind, which matters more: the header is a painting, and a
 * painted cover does not put its title on a grey box. It sets the title in
 * the sky, in foil, and lets the picture carry it. That is what this is
 * now: no plate, no frame, no slab, and no tiny "by" floating beside a
 * sign. The marquee hangs underneath on its own and says who made it by
 * being the thing it is.
 *
 * The lettering is gold leaf: a gradient clipped to the glyphs, which stays
 * sharp at any size where an image would not, over a dark halo that keeps
 * it legible against whatever part of the sky it lands on.
 */
.lintel {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 16px;
  margin-bottom: 26px;
}

.aramaic {
  margin: 0 0 2px;
  font: 600 clamp(17px, 2.4vw, 24px)/1 "Noto Serif Hebrew", serif;
  letter-spacing: .22em;
  color: #e8c97a;
  opacity: .85;
  text-shadow: 0 2px 10px rgba(10, 6, 24, .9), 0 0 24px rgba(10, 6, 24, .7);
}

.lintel h1 {
  margin: 2px 0 0;
  font: 400 clamp(38px, 7.4vw, 86px)/1.02 var(--f-cap);
  letter-spacing: .055em;
  /* gold leaf, cut to the letters */
  background: linear-gradient(176deg, #fff6e0 0%, #f0dba4 26%, #d4a53c 52%,
                              #a9accd 62%, #f3e2ae 74%, #c99a34 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* the halo is what makes it readable over a busy sky, and the hard offset
     under it is what keeps it from floating */
  filter:
    drop-shadow(0 2px 0 rgba(12, 7, 26, .85))
    drop-shadow(0 0 18px rgba(12, 7, 26, .85))
    drop-shadow(0 0 44px rgba(12, 7, 26, .6));
}
.lang-ja .lintel h1 { font-family: var(--f-ja); letter-spacing: .14em; font-weight: 600; }

/* ---------- the scroll ---------- */
.scroll { position: relative; filter: drop-shadow(0 26px 40px rgba(0,0,0,.6)); }
.roller {
  position: relative; height: 34px; margin: 0 -26px; z-index: 2;
  border-radius: 17px;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #c58a52 0%, #8a4f22 40%, #5a2f12 75%, #3a1c08 100%);
  box-shadow: inset 0 3px 2px rgba(255,220,170,.45), inset 0 -4px 6px rgba(0,0,0,.45);
}
.roller::before, .roller::after {   /* brass finials */
  content: ""; position: absolute; top: -6px; width: 34px; height: 46px; border-radius: 50%;
  background: radial-gradient(60% 50% at 40% 30%, #fff1b8, #e0b45a 40%, #a87526 70%, #5a3608);
  box-shadow: 0 4px 8px rgba(0,0,0,.5);
}
.roller::before { left: -22px; }
.roller::after { right: -22px; }
.roller-top { margin-bottom: -10px; }
.roller-bottom { margin-top: -10px; }

.vellum {
  position: relative; padding: 42px clamp(20px, 6vw, 70px) 30px;
  background:
    radial-gradient(140% 60% at 50% 0%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(60% 40% at 15% 70%, rgba(150,100,40,.18), transparent 70%),
    radial-gradient(50% 35% at 85% 30%, rgba(150,100,40,.14), transparent 70%),
    linear-gradient(90deg, rgba(90,55,15,.35), transparent 7%, transparent 93%, rgba(90,55,15,.35)),
    linear-gradient(180deg, var(--vellum-1), var(--vellum-2));
  box-shadow: inset 0 0 40px rgba(90,55,15,.35);
}
.vellum::before { /* grain */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35; mix-blend-mode: multiply;
  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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .3 0 0 0 0 .1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vellum > * { position: relative; }

.epigraph { margin: 0 0 22px; text-align: center; font-style: italic; color: #5a3a14; }
.epigraph p { margin: 0; font-size: 18px; }
.epigraph cite { display: block; margin-top: 4px; font: 14px var(--f-cap); letter-spacing: .12em; color: #7b5a2a; }
/* the lore, set back from the facts: same paragraph, quieter voice */
.lede .aside { display: block; margin-top: 10px; font-size: .88em; font-style: italic; color: #6a4a1c; }
.lede { margin: 0 0 26px; font: 400 19px/1.7 var(--f-scribe); color: #2f1e0a; }
.lede::first-letter {
  float: left; font: 64px/.8 var(--f-cap); margin: 6px 8px 0 0; color: #6b3fd6;
  text-shadow: 1px 1px 0 var(--gold);
}

/* ---------- the writing tablets ---------- */
.rite { display: grid; gap: 18px; }
.tablet { display: grid; grid-template-columns: 46px 1fr; column-gap: 10px; }
/* Inked roundels, in the scribe's hand. They were purple gel buttons with a
   specular highlight, which is a control from a different website: nothing
   else on a scroll is glossy, and a number is not a thing you press. */
.numeral {
  grid-row: span 3;
  align-self: start;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  margin-top: 2px;
  border-radius: 50%;
  font: 400 20px/1 var(--f-cap);
  color: #6b3fd6;
  background: radial-gradient(70% 70% at 36% 30%, rgba(255, 246, 224, .5), transparent 70%);
  box-shadow: inset 0 0 0 2px rgba(107, 63, 214, .55);
}
.lang-ja .numeral { font-family: var(--f-ja); font-size: 17px; }

.t-head { font: 22px/1.2 var(--f-cap); color: #2c1c08; }
.t-head small { font: italic 14px var(--f-ui); color: #7b5a2a; }
.t-hint { font: italic 400 16px/1.5 var(--f-scribe); color: #6a4a1c; }
/* A strip of skin cut from the same hide and laid on the scroll.
 *
 * It was ruled paper, and the ruling was wrong: the lines repeated every
 * 24px while the text box carried 10px of top padding, so every line of
 * writing floated above its rule. Matching the two is possible and it is
 * also a trap, because the moment anybody changes the size of the type or
 * the padding it slides apart again, and a browser's own text metrics are
 * not something a stylesheet can pin down.
 *
 * So there is no ruling. A scribe's vellum is not ruled either: it is
 * pricked and scored, and what you see across it is the grain of the skin.
 * The writing sits on the skin, in ink, which is what the period actually
 * looks like and cannot come apart.
 */
.tablet textarea {
  grid-column: 2; margin-top: 8px; width: 100%; resize: vertical;
  font: 400 18px/1.72 var(--f-scribe);
  color: #3a2410;
  padding: 14px 16px;
  border: 0;
  border-radius: 2px 5px 3px 6px;
  /* the cut edge of the strip, and the shadow it drops on the scroll */
  box-shadow:
    inset 0 0 0 1px rgba(120,86,40,.55),
    inset 0 2px 10px rgba(92,58,14,.28),
    0 1px 0 rgba(255,248,226,.7),
    2px 3px 0 rgba(92,58,14,.18);
  background:
    radial-gradient(70% 50% at 18% 12%, rgba(255,255,255,.5), transparent 70%),
    radial-gradient(45% 40% at 88% 78%, rgba(150,100,40,.16), transparent 70%),
    linear-gradient(176deg, #f6e7c6, #efdcae 55%, #f3e3c0);
  caret-color: #6b3fd6;
}
/* the skin's own fibre, over the strip */
.tablet textarea {
  background-blend-mode: normal, multiply, normal;
}
.tablet textarea::placeholder { color: #9a7c4e; font-style: italic; }
.tablet textarea:focus {
  outline: 0;
  box-shadow:
    inset 0 0 0 1px rgba(107,63,214,.75),
    inset 0 2px 10px rgba(92,58,14,.22),
    0 0 0 3px rgba(107,63,214,.22),
    2px 3px 0 rgba(92,58,14,.18);
}
.margin-note {
  margin: 4px 0 0 56px; font: italic 400 16px/1.6 var(--f-scribe); color: #5a3a14;
  border-left: 2px solid rgba(107,63,214,.4); padding-left: 10px;
}

/* ---------- the wax seal ---------- */
.seal {
  justify-self: center; display: flex; align-items: center; gap: 14px;
  margin-top: 8px; padding: 0 22px 0 0; border: 0; cursor: pointer; background: none;
  font: 22px var(--f-cap); color: #2c1c08;
}
/* The seal is a photograph of a real one now, not a CSS blob.
 *
 * It was two radial gradients and an SVG eye, and it read as a sweet rather
 * than as wax: wax has a torn rim, bubbles, and a matrix impression that
 * catches light on one side only, and none of those three is a gradient.
 *
 * **It sits on cream and multiplies.** The image was made on plain parchment
 * on purpose, so `mix-blend-mode: multiply` drops its background into the
 * vellum exactly, whatever shade the scroll is at that point, with no cut
 * edge and no alpha channel to go wrong. That is also why it does not need
 * a transparent PNG, which Midjourney cannot produce anyway.
 */
.seal-wax {
  width: 96px; height: 96px;
  /* zoomed past its own margin and clipped to a circle, so the parchment the
     seal was photographed on never reaches the page. What little is left
     inside the circle multiplies into the vellum. Midjourney cannot output
     an alpha channel and Adobe's remover wants a file picker, so this is the
     cheap trick that gets the same result at 96px. */
  background: url("../img/wax-seal.png") center / 128% auto no-repeat;
  border-radius: 50%;
  mix-blend-mode: multiply;
  position: relative;
  transition: transform .15s;
  filter: drop-shadow(2px 3px 2px rgba(60, 20, 10, .3));
}

.seal:hover .seal-wax, .seal:focus-visible .seal-wax { transform: rotate(-6deg) scale(1.04); }
.seal:disabled { cursor: wait; opacity: .7; }
.seal:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; border-radius: 40px; }
.status { min-height: 1.4em; margin: 0; text-align: center; font-style: italic; color: #6b3fd6; }
.status.err { color: #a3180f; }

/* ---------- the reckoning ---------- */
.reckoning { margin-top: 34px; padding-top: 26px; border-top: 3px double rgba(120,80,30,.5); }
.reckoning h2 { margin: 0 0 6px; text-align: center; font: 32px var(--f-cap); color: #2c1c08; }
.verdict { margin: 0 0 18px; text-align: center; font-size: 21px; }
.verdict strong { color: #6b3fd6; }

/* the figures are the Watchers speaking: a dark brass-framed glass */
.sums {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px;
  margin: 0 0 22px; padding: 14px; border-radius: 10px;
  background: radial-gradient(120% 120% at 50% 0%, #2a1f4d, #120d22);
  border: 6px solid transparent;
  border-image: linear-gradient(180deg, #fff1b8, #e0b45a 30%, #a87526 60%, #5a3608) 1;
  box-shadow: inset 0 0 24px rgba(141,255,191,.15), 0 4px 10px rgba(0,0,0,.4);
}
.sums div { text-align: center; }
.sums dt { font: 13px var(--f-cap); letter-spacing: .1em; color: #c9b98f; }
.sums dd { margin: 2px 0 0; font: 40px/1 var(--f-eye); color: var(--mint); text-shadow: 0 0 10px rgba(141,255,191,.6); }
.sums dd.warn { color: var(--mustard); text-shadow: 0 0 10px rgba(255,200,61,.5); }

.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px;
  padding: 8px 4px; border-bottom: 1px dashed rgba(120,80,30,.35);
}
.ledger .mark { width: 30px; height: 20px; }
.ledger .name { font-size: 18px; }
.ledger .note { display: block; font-size: 14px; font-style: italic; color: #7b5a2a; }
.ledger .price { font: 22px var(--f-eye); color: #2c1c08; }
.via { margin: 12px 0 0; text-align: center; font-size: 14px; font-style: italic; color: #7b5a2a; }

.deeds { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 26px; }
.messenger label, .carve .t-hint { display: block; }
.messenger label { font: 18px var(--f-cap); margin-bottom: 6px; }
.messenger-row { display: flex; gap: 8px; }
.messenger input {
  flex: 1; min-width: 0; font: 16px var(--f-ui); padding: 9px 10px; border: 1px solid #8a6a36; border-radius: 4px;
  background: linear-gradient(180deg, #efdcae, #f7ead0); box-shadow: inset 0 2px 6px rgba(80,50,10,.3);
}
.messenger button, .carve button {
  font: 18px var(--f-cap); color: #fff6e0; cursor: pointer; padding: 9px 16px; border-radius: 6px;
  border: 1px solid #1b1530;
  background: linear-gradient(180deg, #8a6bf0, #6b3fd6 50%, #3d2490);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 3px 0 #1b1530;
}
.messenger button:active, .carve button:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 1px 0 #1b1530; }
.carve button { width: 100%; }
.carve .t-hint { margin-top: 6px; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .wrap { padding-top: 470px; }
  .sky { height: 680px; }
  .lintel-stone { padding: 14px 22px; }
  .roller { margin: 0 -10px; }
  .roller::before { left: -12px; } .roller::after { right: -12px; }
  .tablet { grid-template-columns: 1fr; }
  .numeral { grid-row: auto; width: 34px; height: 34px; font-size: 18px; margin-bottom: 4px; }
  .tablet textarea { grid-column: 1; }
  .margin-note { margin-left: 0; }
  .deeds { grid-template-columns: 1fr; }
}

/* ---------- the field notes ---------- */

/* A scribe's aside, set narrower than the body and in the same hand. It sits
 * under the rite rather than above it, because somebody arriving with a
 * bundle page in the clipboard should reach the first tablet without reading
 * a word of Enoch. */
.field-notes {
  margin: 30px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid rgba(120,86,40,.4);
}
.field-notes h2 {
  margin: 0 0 14px;
  font: 26px/1.1 var(--f-cap);
  color: #2c1c08;
  letter-spacing: .02em;
}
.field-notes p {
  margin: 0 0 14px;
  font: 400 17px/1.75 var(--f-scribe);
  color: #3a2614;
  max-width: 62ch;
}
.field-notes b { font-weight: 600; color: #2c1c08; }
.field-notes i { color: #5a3a14; }
.field-notes [lang="arc"] { font-family: "Noto Serif Hebrew", serif; font-size: 1.15em; }

/* ---------- the far side of the mountain ---------- */

/* The page ends where it began. The ridge is the painting's silhouette
 * carried round to the bottom, with a few of them still standing on it, so
 * the colophon sits in the same night rather than on a black bar. Drawn,
 * not a second photograph: at this size and this opacity a silhouette is
 * three paths, and a 400 KB image for the sake of a shape is not a trade
 * worth making twice on one page. */
/* The far side of the mountain. It was a near black shape on a near black
   page, which is to say nothing at all: it now carries the painting's own
   blues at the ridge line so the eye finds it, and it sits closer to the
   scroll so the page does not end in a field of empty purple. */
.farside {
  display: block;
  width: 100%;
  height: clamp(110px, 15vw, 200px);
  margin: 18px 0 -2px;
}
.colophon {
  margin: 0;
  padding: 0 16px 54px;
  text-align: center;
  background: #0b0818;
}
.colophon p { margin: 0 0 10px; max-width: 70ch; margin-inline: auto; }
.colophon p:first-child { color: #c9b98f; font-size: 16px; font-style: italic; line-height: 1.6; }
.colophon a { color: var(--mint); }

/* ---------- the page in Japanese ---------- */

/* IM Fell and EB Garamond have no kana, and a browser's fallback for a
   seventeenth century English face is whatever sans the system reaches for
   first, which lands a UI font in the middle of a scroll. Shippori Mincho is
   a mincho: a brush-derived serif, which is the nearest thing Japanese has
   to the hand this page is set in. */
.lang-ja {
  --f-ui: var(--f-ja);
  --f-cap: var(--f-ja);
  --f-scribe: var(--f-ja);
}
.lang-ja body { font-size: 17px; line-height: 1.85; }
/* a drop capital is a Latin habit; in Japanese it reads as a typo */
.lang-ja .lede::first-letter { float: none; font-size: inherit; margin: 0; color: inherit; text-shadow: none; }
.lang-ja .lintel h1 { letter-spacing: .12em; }
.lang-ja .tablet textarea { font-size: 16px; line-height: 1.8; }
.lang-ja .field-notes p { font-size: 16px; line-height: 1.95; }
.lang-ja .epigraph p { font-size: 17px; }

/* ---------- the marquee on the lintel ---------- */

.lintel-credit {
  display: block;
  width: fit-content;
  margin: 16px auto 0;
  text-decoration: none;
  transition: transform .14s ease-out;
}
.lintel-credit:hover { transform: translateY(-2px); }
.lintel-credit:focus-visible { outline: 2px solid var(--teal); outline-offset: 8px; border-radius: 8px; }

.marquee {
  display: block;
  width: clamp(150px, 21vw, 210px);
  height: auto;
  overflow: visible;
  /* it hangs in the sky, so it throws a soft shadow rather than an engraved one */
  filter: drop-shadow(0 6px 14px rgba(8, 4, 20, .85));
  transition: filter .14s ease-out;
}
.lintel-credit:hover .marquee { filter: drop-shadow(0 10px 18px rgba(8, 4, 20, .9)); }

/* The chase. Eight phases round 52 bulbs, so the light travels rather than
   blinking: each bulb is dim most of the cycle and bright for an eighth of
   it. One animation, eight negative delays, no JavaScript, and it stops
   dead under prefers-reduced-motion. */

  14%  { opacity: .62; fill: #fff3b0; }
  34%  { opacity: .34; fill: #e8d588; }
  100% { opacity: .34; fill: #e8d588; }
}

.lintel-credit:hover .mb-lamp,
.lintel-credit:hover .mb-halos circle { animation-duration: 1s; }

@media (prefers-reduced-motion: reduce) {
  .lintel-credit { transition: none; }
}

/* ---------- the Watchers' hand ---------- */

.wrap-plain { padding-top: 54px; }
.cap-h { margin: 0 0 14px; font: 400 clamp(28px, 5vw, 40px)/1.1 var(--f-cap); color: #2c1c08; }
.lang-ja .cap-h { font-family: var(--f-ja); }

.cap-drag { margin: 22px 0 6px; text-align: center; }

/* The bookmarklet itself, dressed as the thing it becomes: a tab on a
   bookmarks bar. It cannot be clicked, only dragged, so it is styled to be
   picked up rather than pressed. */
.cap-hand {
  display: inline-block;
  font: 400 19px/1 var(--f-cap);
  letter-spacing: .06em;
  text-decoration: none;
  color: #1b1530;
  background: linear-gradient(#ffe07a, #ffc83d);
  border: 3px solid #1b1530;
  border-radius: 8px;
  padding: 13px 22px 11px;
  box-shadow: 4px 5px 0 #1b1530;
  cursor: grab;
}
.lang-ja .cap-hand { font-family: var(--f-ja); }
.cap-hand:active { cursor: grabbing; transform: translate(2px, 3px); box-shadow: 1px 1px 0 #1b1530; }
.cap-drag-hint { text-align: center; margin: 0 0 20px; }

.cap-steps { margin: 0 0 18px; padding-left: 1.3em; }
.cap-steps li { font: 400 17px/1.75 var(--f-scribe); color: #3a2614; margin-bottom: 8px; }

.cap-back { font: 400 17px var(--f-cap); color: #6b3fd6; }
.lang-ja .cap-back { font-family: var(--f-ja); }

/* the way to it from the second tablet */
.hand-link {
  display: inline-block;
  margin-left: 4px;
  font-style: normal;
  color: #6b3fd6;
  text-decoration-thickness: 1px;
  white-space: nowrap;
}

/* ------------------------------------------------------ the marquee lamps
   The ring itself is generated by tools/marquee.py in compact-network;
   this is only the chase.

   Six phases, so the dark travels round the ring one lamp at a time
   rather than every third lamp blinking together. Each lamp is a single
   group, so this animates one element per bulb instead of six, and it
   moves opacity only, which the compositor does without repainting. */
.mb-lamp, .mb-halos circle { animation: mb-chase 1.9s linear infinite; }
.mb-p0 { animation-delay: 0s; }
.mb-p1 { animation-delay: -.317s; }
.mb-p2 { animation-delay: -.633s; }
.mb-p3 { animation-delay: -.95s; }
.mb-p4 { animation-delay: -1.267s; }
.mb-p5 { animation-delay: -1.583s; }

/* A filament has thermal lag: it does not snap off the way a neon tube
   does, so this ramps down and comes back, and never goes fully dark — a
   cold bulb on a lit sign reads as a dead bulb. */
@keyframes mb-chase {
  0%, 58%, 100% { opacity: 1; }
  72%           { opacity: .42; }
  86%           { opacity: .78; }
}

@media (prefers-reduced-motion: reduce) {
  .mb-lamp, .mb-halos circle { animation: none; opacity: 1; }
}
