/*
 * Bluejay — the legal and utility pages: privacy, terms, support, delete-account, bot and 404.
 *
 * Loaded after site.css, which gives these pages what they share with the four main pages: the
 * tokens, the fonts, the nav, the menu, the footer, the buttons and the eyebrow, and the light
 * band's colours (.light). This file adds only the reading layout: a dark header band (eyebrow,
 * title, lede, the draft line where a page has one), the text on a light band, then the footer.
 * No scenes and no scroll engine: every word reads without JS (pages.js adds the nav's states
 * and the menu). The components here are this file's own, so a change to the main pages'
 * hero or scenes in site.css cannot move them.
 *
 * 404.html links this file as /pages.css: Pages serves it for a missing path at any depth.
 */

/* ---- the reading column: one measure for the header band and the text, centred ----
   31em at 18px is ~68 characters a line, measured. (66ch would be ~84 here: a ch is the width
   of a digit, wider than the average letter.) */
.doc__col {
  width: 100%;
  max-width: calc(31em + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
  font-size: 18px; /* the measure is taken at reading size */
}

/* ---- the dark header band ---- */
.doc-head {
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-h) + 96px) 0 76px;
  background: var(--night-1);
}
.doc-head__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(48% 110% at 84% 0%, rgba(58, 120, 182, 0.34), transparent 70%),
    radial-gradient(36% 80% at 6% 100%, rgba(30, 70, 116, 0.24), transparent 70%);
}
.doc-head .doc__col { position: relative; }
.doc-head__title {
  font-family: var(--f-display);
  font-optical-sizing: auto;
  font-weight: 430;
  font-size: clamp(2.5rem, 5.2vw, 4.25rem);
  letter-spacing: -0.034em;
  line-height: 1.03;
  text-wrap: balance;
  color: var(--text);
}
.doc-head__lede {
  margin-top: 26px;
  font-size: clamp(1.08rem, 1.45vw, 1.25rem);
  line-height: 1.6;
  color: var(--text-2);
}
.doc-head__cta { margin-top: 32px; }
/* the draft line: a quiet pill, like the main pages' "Not on sale yet" */
.doc-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding: 8px 15px 8px 13px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-2);
  background: rgba(16, 37, 58, 0.55);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.doc-note__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 10px 1px rgba(111, 168, 232, 0.6);
}
/* the band's lines rise in once, as Your data's intro does; only with motion (html.motion) */
.motion .doc-head .doc__col > * { animation: docUp 0.9s var(--ease-out) both; }
.motion .doc-head .doc__col > :nth-child(2) { animation-delay: 0.06s; }
.motion .doc-head .doc__col > :nth-child(3) { animation-delay: 0.16s; }
.motion .doc-head .doc__col > :nth-child(4) { animation-delay: 0.26s; }
@keyframes docUp { from { opacity: 0; transform: translateY(16px); } }

/* ---- the light band: the text ---- */
.doc {
  position: relative;
  padding: 84px 0 128px;
  background: linear-gradient(180deg, #e3ecf4 0, #f3f7fa 280px, #fafcfd 680px, #fff 100%);
}
.doc__body {
  color: var(--text-2);
  font-size: 18px;
  line-height: 1.7;
  overflow-wrap: break-word;
}
.doc__body > * + * { margin-top: 1.05em; }
.doc__body h2 {
  font-family: var(--f-display);
  font-optical-sizing: auto;
  font-weight: 450;
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  letter-spacing: -0.026em;
  line-height: 1.14;
  text-wrap: balance;
  color: var(--text);
}
/* each section after the first opens on a hairline (ems of the heading's own size) */
.doc__body > h2:not(:first-child) {
  margin-top: 1.7em;
  padding-top: 0.95em;
  border-top: 1px solid var(--line);
}
.doc__body h3 {
  font: 600 1.2rem/1.4 var(--f-body);
  letter-spacing: -0.01em;
  color: var(--text);
}
.doc__body > h3:not(:first-child) { margin-top: 1.8em; }
.doc__body > h2 + *,
.doc__body > h3 + * { margin-top: 0.6em; }
.doc__body > h2 + h3 { margin-top: 1.1em; }
/* an anchor lands with air under the nav (html's scroll-padding-top clears the nav itself) */
.doc__body [id] { scroll-margin-top: 28px; }

.doc__body strong { color: var(--text); }
.doc__body a {
  color: var(--mid);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(48, 104, 168, 0.42);
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.doc__body a:hover { color: var(--ink); text-decoration-color: currentColor; }

/* lists keep their markers (and so their list semantics), in the brand's blue */
.doc__body ul,
.doc__body ol { display: grid; gap: 0.55em; padding-left: 1.3em; }
.doc__body ul { list-style: disc; }
.doc__body ol { list-style: decimal; }
.doc__body li { padding-left: 0.35em; }
.doc__body li::marker { color: var(--bright); font-weight: 600; }

/* tables: a white card, a row per fact; on a phone each row stacks, its name over its text */
.doc__table {
  margin-top: 1.4em;
  overflow-x: auto;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(18, 48, 72, 0.08), 0 40px 70px -50px rgba(18, 48, 72, 0.45);
}
.doc__body > h2 + .doc__table { margin-top: 0.9em; }
.doc__body table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.6; }
.doc__body th,
.doc__body td { padding: 17px 26px; text-align: left; vertical-align: top; }
.doc__body tr + tr > * { border-top: 1px solid rgba(18, 48, 72, 0.09); }
.doc__body th { width: 32%; padding-right: 12px; font-weight: 600; color: var(--text); }
.doc__body td { padding-left: 12px; color: var(--text-2); }

/* code: inline in a tint of the brand's blue; blocks in the site's night */
.doc__body code {
  padding: 0.1em 0.38em;
  border-radius: 6px;
  font-family: var(--f-mono);
  font-size: 0.86em;
  color: var(--ink);
  background: rgba(48, 104, 168, 0.08);
  box-shadow: inset 0 0 0 1px rgba(48, 104, 168, 0.13);
  overflow-wrap: anywhere;
}
.doc__body pre {
  padding: 18px 22px;
  border-radius: 16px;
  font: 400 14.5px/1.7 var(--f-mono);
  color: #dce9f5;
  background: var(--night-2);
  box-shadow: inset 0 0 0 1px rgba(156, 198, 242, 0.12), 0 26px 50px -36px rgba(4, 11, 19, 0.8);
  /* wraps rather than scrolls, so a phone shows every character */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.doc__body pre code { padding: 0; font: inherit; color: inherit; background: none; box-shadow: none; }

/* wider screens: tables and code blocks hang into the margin, so the words inside them line up
   with the paragraphs' (a phone's gutter is too narrow to hang into) */
@media (min-width: 760px) {
  .doc__table { margin-inline: -26px; }
  .doc__body pre { margin-inline: -22px; }
}

/* ---- 404: one short paragraph, so a shorter band ---- */
.doc--short { padding: 64px 0 96px; }

/* ---- the Extension page's pictures (extension.html) ----
   The store's four 1280 × 800 panels in a column wider than the text (they are pictures of a
   browser, and read at the text's measure as thumbnails), each a card with its caption under
   it; then the popup itself, light beside dark, on a ground that shows each one off. */
.gallery {
  width: 100%;
  max-width: calc(1040px + 2 * var(--gutter));
  margin: 0 auto 64px;
  padding: 0 var(--gutter);
  display: grid;
  gap: 40px;
}
.gallery__fig { margin: 0; }
.gallery__fig img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  background: var(--night-1);
  box-shadow: 0 0 0 1px rgba(18, 48, 72, 0.1), 0 40px 70px -40px rgba(18, 48, 72, 0.5);
}
.gallery__fig figcaption,
.pair__fig figcaption {
  margin-top: 16px;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 44em;
}
.gallery__fig figcaption strong { color: var(--text); font-weight: 600; }
/* the "see more" link at the end of a paragraph, in the text's own voice */
.doc__body .more-in { display: inline-block; margin-left: 0.25em; font-weight: 600; }
/* a button in the text keeps the button's own colours (the text's link rule is more specific) */
.doc__body .btn,
.doc__body .btn:hover { color: #fff; text-decoration: none; }

.pair {
  width: 100%;
  max-width: calc(31em + 2 * var(--gutter) + 180px);
  margin: 28px auto 64px;
  padding: 0 var(--gutter);
  font-size: 18px; /* so the max-width's em matches .doc__col's */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.pair__fig {
  margin: 0;
  padding: 22px 22px 18px;
  border-radius: 22px;
  text-align: center;
}
.pair__fig img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(18, 48, 72, 0.08), 0 24px 50px -30px rgba(18, 48, 72, 0.6);
}
.pair__fig figcaption { margin-top: 14px; font-size: 14px; font-weight: 600; letter-spacing: 0.02em; }
/* light sits on the belly blue, dark on the site's night — each popup on the ground it is for */
.pair__fig--light { background: #dbe7f1; box-shadow: inset 0 0 0 1px rgba(18, 48, 72, 0.08); }
.pair__fig--light figcaption { color: var(--ink); }
.pair__fig--dark { background: var(--night-1); box-shadow: inset 0 0 0 1px rgba(156, 198, 242, 0.12); }
.pair__fig--dark figcaption { color: #dce9f5; }

@media (max-width: 759px) {
  .gallery { gap: 28px; margin-bottom: 48px; }
  .gallery__fig img { border-radius: 16px; }
  .gallery__fig figcaption,
  .pair__fig figcaption { margin-top: 12px; font-size: 15.5px; }
  .pair { grid-template-columns: 1fr; gap: 16px; margin-bottom: 48px; }
  .pair__fig { padding: 16px 16px 14px; border-radius: 18px; }
}

/* ---- the nav and footer on these pages ---- */
/* Without JS the nav keeps the solid class it is written with; opaque, so it reads over the
   light band too (pages.js gives it the main pages' states: clear at the top, light glass over
   the light band). */
html:not(.js) .nav.is-solid { background: rgba(6, 16, 28, 0.94); }
/* the page you are on, in the footer and the menu's foot */
.footer__links a[aria-current="page"] { color: var(--text); background: rgba(156, 198, 242, 0.08); }
.menu__foot a[aria-current="page"] { color: var(--text); }

@media (max-width: 759px) {
  .doc-head { padding: calc(var(--nav-h) + 50px) 0 46px; }
  .doc-head__title { font-size: clamp(2.2rem, 10.5vw, 2.9rem); }
  .doc-head__lede { margin-top: 18px; }
  .doc-note { margin-top: 24px; font-size: 13.5px; }
  .doc { padding: 56px 0 88px; }
  .doc--short { padding: 44px 0 72px; }
  .doc__body { font-size: 17px; line-height: 1.66; }
  .doc__body h2 { font-size: 1.62rem; }
  /* small enough that the user agent and the Nginx block keep their lines at 390px */
  .doc__body pre { padding: 14px; font-size: 12px; }
}
@media (max-width: 600px) {
  .doc__table { border-radius: 18px; }
  .doc__body table { font-size: 15.5px; }
  .doc__body th,
  .doc__body td { display: block; width: auto; padding: 0 20px; }
  .doc__body th { padding-top: 15px; }
  .doc__body td { padding-top: 3px; padding-bottom: 15px; }
  .doc__body tr + tr > td { border-top: 0; }
}
