/* The pages beside the wall: the 404 page, the terms and the privacy notice. Same ink, wall, type and logo as the
   wall (style.css), read as long text. Founder, 3 Dec 2026: «404, какие еще страницы там под стиль подогнать, термсы,
   полисы». A page of its own rather than style.css: style.css carries the wall and the open view, and
   neither is needed here. The 404 page is served at any unknown address, so every url() here and every link
   in the pages is absolute (/logo/..., /terms/). */

/* ---------- tokens: the same values as the :root block in style.css (change both) ---------- */
/* One light theme. Founder, 3 Dec 2026: «наш черный #1E1915, темную тему убераем», «наш белый F5F2EB». Ink on the wall
   is 15.6:1. No dot screen and no paper texture (founder, 3 Dec 2026: «Текстуру с фона. Вообще отовсюду текстуру»). */
:root { color-scheme: light; --wall: #F5F2EB; --ink: #1E1915;
  /* the colour a poster shows while it loads; 13.3:1 for ink on it */
  --sk: color-mix(in srgb, var(--wall) 92%, var(--ink));
  /* secondary text (dates, list markers): 72% ink, 6.5:1 on the wall */
  --dim: color-mix(in srgb, var(--ink) 72%, var(--wall)); }

/* Helvetica Neue, as on the wall (style.css --font; founder, 3 Dec 2026: «оставляем Helvetica New»). */
* { box-sizing: border-box; }
html { background: var(--wall); -webkit-text-size-adjust: 100%; }
/* two type sizes on every page, the wall's: 12/16 for text and 24/28 semibold for a title (founder, 3 Dec 2026:
   «у нас только 2 размера») */
body { margin: 0; color: var(--ink);
  font: 400 12px/16px 'Helvetica Neue', Helvetica, Arial, sans-serif; }
/* selected text is inverted: our black under our white (founder, 3 Dec 2026: «инверсию, не голубой, а вот наш черный, и
   текст как бы становится нашим белым») */
::selection { background: var(--ink); color: var(--wall); }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration: none; }   /* founder, 3 Dec 2026: «Ховер на ссылках просто убираем подчеркивание» */

/* ---------- the logo: the wall's mark at the wall's size, here a link home ---------- */
.top { height: calc(112px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); display: grid; place-items: center; }
/* the words RARE BISCUIT moving as at the end of the wall's logo: the wall's ring of frames 36 to 41, 130 ms each, round
   and round (founder, 3 Dec 2026: «лого в статичных страницах не зациклен и статичен»). Here in CSS alone: logo/ring.webp
   holds just those six frames (22 KB, pixel for pixel the wall's), so the page needs no script and not the whole hand.
   Same size as on the wall. Reduced motion: the words at rest (the last frame, as on the wall). */
.logo { display: block; width: 126px; height: 90px; color: var(--ink); }
.logo .mark { display: block; width: 100%; height: 100%; background: url(/logo/ring.webp?v=075c2c09) 0 0 / 600% 100% no-repeat;
  animation: rb-ring 780ms steps(6, end) infinite; }
@keyframes rb-ring { from { background-position-x: 0%; } to { background-position-x: 120%; } }
@media (prefers-reduced-motion: reduce) { .logo .mark { animation: none; background-position-x: 100%; } }
@media (min-width: 760px) { .top { height: calc(136px + env(safe-area-inset-top)); } .logo { width: 154px; height: 110px; } }

/* ---------- long text: the terms and the privacy notice ---------- */
/* 12/16 body at 30rem: about 80 characters a line in Helvetica Neue. Section titles are the body size in semibold. */
.doc { max-width: calc(30rem + 32px); margin: 0 auto; padding: 8px 16px 64px; }
.doc h1 { margin: 8px 0 8px; font-size: 24px; line-height: 28px; font-weight: 600; }
.doc h2 { margin: 32px 0 4px; font-size: 12px; line-height: 16px; font-weight: 600; }
@media (min-width: 760px) { .doc { padding: 24px 24px 96px; max-width: calc(30rem + 48px); } }
.doc p, .doc ul { margin: 0 0 16px; text-wrap: pretty; }
.doc ul { padding-left: 1.1em; }
.doc li { margin-bottom: 4px; padding-left: 2px; }
.doc li::marker { color: var(--dim); }
.doc .meta { margin-bottom: 24px; color: var(--dim); }
/* the draft note: plain text on the wall, no card (founder, 3 Dec 2026: «карточку полностью убираем») */
.doc .draft { margin: 0 0 32px; }
/* text still missing ([LEGAL NAME] and the like): on the loading tone with a dotted underline, so nobody reads past it */
.todo { background: var(--sk); text-decoration: underline dotted; text-underline-offset: 3px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* ---------- footer: the wall's line (style.css .foot) ---------- */
.foot { max-width: calc(30rem + 32px); margin: 0 auto; padding: 0 16px 32px; font-size: 12px; line-height: 16px; text-align: center; }
@media (min-width: 760px) { .foot { max-width: calc(30rem + 48px); padding: 0 24px 48px; } }
.foot p { margin: 0; }
.foot a { display: inline-block; padding: 4px 0; }
.foot a[aria-current] { text-decoration: none; }

/* ---------- 404: the empty place where a poster hung, and a line of text under it ---------- */
/* The wall's open view, with nothing on it: a bare patch the size of a poster (the --sk sheet a poster shows while it
   loads), hung straight (founder, 3 Dec 2026: «Повороты … убрать»), and the text under it on the wall itself, where
   the museum card used to be (founder, 3 Dec 2026: «карточку полностью убираем … Заголовок, текст»). NN/g and
   GOV.UK: say plainly what happened, no code number, no blame, one way on. */
.lost { min-height: 100vh; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; }
.spot { display: grid; justify-items: center; align-content: center; padding: 8px 16px 48px; }
.patch { width: min(72vw, 300px, 36svh); aspect-ratio: 3 / 4; background: var(--sk); }
.spot .note { width: min(max(240px, calc(min(72vw, 300px, 36svh) * .7)), 320px); margin-top: 24px; text-align: center; }
.spot h1 { margin: 0; font-size: 24px; line-height: 28px; font-weight: 600; }
.spot p { margin: 4px 0 0; }
.spot .home { margin-top: 12px; }
.spot .home a { display: inline-block; padding: 4px 0; margin: -4px 0; }
.lost .foot { width: 100%; }
