/* Reading pages: FAQ, Rules and the staff application (design overhaul, second pass). One sheet for the three,
   in place of faq.css, rules.css and staff-application.css. Load it last, after effects.css and ui/lazarus.css.
   Brand values and controls come from ui/brand.css and ui/lazarus.css (.lz-button, .lz-kicker, .lz-disclosure,
   .lz-panel, .lz-state); this file owns the layout: a compact picture banner, numbered chapters, a section index
   that stays with the reader, and text in a column of about 68 characters.
   Nothing is hidden to be faded in, and every section reads without scripts. */

*{box-sizing:border-box;margin:0;padding:0}
:root { --read-top: 98px; --read-control: #48513e; }   /* --read-top: the fixed menu's height */
html { scroll-padding-top: calc(var(--read-top) + 28px); }
html, body { background: var(--lz-ink); color: var(--lz-text); font-family: var(--lz-body); -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.wrap { width: min(1100px, 92vw); margin: 0 auto; position: relative; }
main { position: relative; z-index: 2; }
/* Page backdrop, as on the other main pages: effects.css paints ::before, this adds the shared grain. */
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -2; }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; background-image: var(--lz-grain); }

/* ---------- banner: the title on ink, the picture to the right. It settles once; the title is simply there. ---------- */
.read-hero { position: relative; isolation: isolate; overflow: hidden; padding: calc(var(--read-top) + 54px) 0 42px; border-bottom: 1px solid var(--lz-border); background: var(--lz-ink); }
.read-hero__art { position: absolute; inset: 0 0 0 auto; z-index: -2; width: min(64%, 940px); max-width: none; height: 100%; object-fit: cover; object-position: 50% 32%; filter: saturate(.96) brightness(.84); -webkit-mask-image: linear-gradient(90deg, transparent, #000 44%); mask-image: linear-gradient(90deg, transparent, #000 44%); animation: readSettle var(--lz-scene) var(--lz-settle) both; }
.read-hero::after { content: ''; position: absolute; inset: auto 0 0; z-index: -1; height: 46%; pointer-events: none; background: linear-gradient(0deg, var(--lz-ink), transparent); }
/* Page exception to the hero role: a reading page's title stops at 76px. */
.read-hero h1 { font: 400 clamp(44px, 5.6vw, 76px)/.95 var(--lz-display); letter-spacing: .01em; text-transform: uppercase; }
.read-hero h1 em, .read-section h2 em, .read-help h2 em { font-style: normal; color: var(--lz-accent); }
.read-hero__lede { max-width: min(34em, 56vw); margin-top: 14px; color: var(--lz-secondary); font: 400 18px/1.6 var(--lz-body); text-wrap: pretty; }
.read-hero__facts { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 18px; list-style: none; color: var(--lz-secondary); font: 700 13px/1.4 var(--lz-heading); letter-spacing: .14em; text-transform: uppercase; }
.read-hero__facts b { color: var(--lz-accent); }

/* ---------- reading progress: a line under the menu, moved by the scroll position itself.
              Browsers without scroll timelines show no line. ---------- */
.read-progress { display: none; }
@supports (animation-timeline: scroll()) {
  .read-progress { display: block; position: absolute; inset: auto 0 -1px; height: 2px; pointer-events: none; background: var(--lz-original); transform-origin: left center; animation: readProgress linear both; animation-timeline: scroll(root block); }
}

/* ---------- layout: index rail and the text column ---------- */
.read { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0 56px; align-items: start; padding: 40px 0 88px; }
.read-body { max-width: 720px; counter-reset: chapter; }

/* The index. One marker slides to the section being read (reading.js sets --marker-y and --marker-s). */
.read-index { position: sticky; top: calc(var(--read-top) + 30px); display: grid; border-left: 2px solid var(--lz-border); }
.read-index a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 16px; color: var(--lz-muted); font: 700 14px/1.3 var(--lz-heading); letter-spacing: .12em; text-transform: uppercase; transition: color var(--lz-feedback) var(--lz-settle); }
.read-index a[aria-current] { color: var(--lz-text); }
.read-index a[aria-current] .read-icon { color: var(--lz-accent); }
/* One drawing per chapter (FAQ and Rules), drawn once in the page and used twice: beside the chapter's name
   in the index and on the card that opens the chapter. Shapes only; the line comes from here. */
.read-icons { position: absolute; width: 0; height: 0; overflow: hidden; }
.read-icon { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.read-index .read-icon { transition: color var(--lz-feedback) var(--lz-settle); }
.read-index::after { content: ''; position: absolute; left: -2px; top: 0; width: 2px; height: 100px; pointer-events: none; background: var(--lz-accent); transform-origin: top; transform: translateY(var(--marker-y, 0px)) scaleY(var(--marker-s, 0)); transition: transform var(--lz-feedback) var(--lz-settle); }

/* ---------- chapters ---------- */
.read-section { counter-increment: chapter; margin-top: 46px; padding-top: 30px; border-top: 1px solid var(--lz-border); }
.read-section:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.read-section > .lz-kicker::before { content: counter(chapter, decimal-leading-zero) ' \2014  '; color: var(--lz-muted); }
.read-section h2 { margin-bottom: 16px; font: 400 clamp(30px, 3.4vw, 44px)/1 var(--lz-display); letter-spacing: .01em; text-transform: uppercase; }
.read-section h3 { margin: 30px 0 10px; color: var(--lz-text); font: 700 22px/1.2 var(--lz-heading); letter-spacing: .03em; text-transform: uppercase; }
.read-section :is(p, li) { color: var(--lz-secondary); font: 400 16px/1.65 var(--lz-body); }
.read-section > :is(p, ul, ol, .lz-state, .lz-panel) { max-width: 42em; }
.read-section p + p { margin-top: 12px; }
.read-section b, .read-section strong { color: var(--lz-text); font-weight: 600; }
.read-section :is(p, li) a { color: var(--lz-accent); text-decoration: underline; text-underline-offset: 3px; }
.read-section--danger { --lz-accent: var(--red); }
/* A chapter opens with its short version: what most readers came for, ahead of the detail. The words restate
   the chapter below and never add to it; when a chapter changes, its short version changes with it. */
.read-gist { display: flex; align-items: flex-start; gap: 14px; max-width: 42em; margin-bottom: 20px; padding: 14px 18px 15px 15px; border: 1px solid var(--lz-border); border-left: 3px solid var(--lz-accent); background: var(--lz-surface); }
.read-gist .read-icon { width: 26px; height: 26px; margin-top: 3px; color: var(--lz-accent); }
.read-section .read-gist p { color: var(--lz-text); font: 500 17px/1.55 var(--lz-body); }
.read-gist__label { display: block; margin-bottom: 3px; color: var(--lz-accent); font: 700 13px/1.4 var(--lz-heading); letter-spacing: .2em; text-transform: uppercase; }
/* On the FAQ the card ends where the search box and the questions end, not at the text measure. */
.read--aside .read-gist { max-width: none; }

/* Rules carry a number a moderator can quote: chapter, then rule. */
.read-rules { margin: 14px 0 6px; list-style: none; counter-reset: rule; }
.read-rules li { counter-increment: rule; position: relative; padding: 10px 0 10px 58px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.read-rules li::before { content: counter(chapter) '.' counter(rule); position: absolute; left: 0; top: 10px; color: var(--lz-accent); font: 700 16px/1.65 var(--lz-heading); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.read-list { display: grid; gap: 8px; margin: 12px 0; list-style: none; }
.read-list li { position: relative; padding-left: 22px; }
.read-list li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; background: var(--lz-accent); }
.lz-ui .read-section .lz-state { margin: 22px 0; color: var(--lz-secondary); font: 400 16px/1.65 var(--lz-body); }
.read-flag { display: block; margin-bottom: 6px; color: var(--lz-danger); font: 700 13px/1.4 var(--lz-heading); letter-spacing: .2em; text-transform: uppercase; }
.lz-ui .read-section .lz-panel { margin: 22px 0; }
.read-section .lz-panel h3 { margin: 0 0 4px; color: var(--lz-accent); font-size: 16px; letter-spacing: .12em; }
.read-section .lz-panel :is(.read-rules, .read-list):last-child { margin-bottom: 0; }
.read-section .lz-panel .read-rules li:last-child { border-bottom: 0; padding-bottom: 0; }

/* ---------- FAQ: search, then questions that open in place ---------- */
.read-search { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; margin-bottom: 34px; padding: 0 16px; border: 1px solid var(--read-control); border-left: 3px solid var(--lz-accent); background: var(--lz-surface); }
.read-search:focus-within { outline: 2px solid var(--lz-accent); outline-offset: 2px; }
.read-search svg { flex: none; width: 18px; height: 18px; color: var(--lz-muted); }
.read-search input { flex: 1; min-width: 0; min-height: 52px; border: 0; outline: none; background: none; color: var(--lz-text); font: 400 16px/1.4 var(--lz-body); }
/* One ring, on the box: the design system's ring for anything focused would draw a second one on the field. */
.lz-ui .read-search input:focus-visible { outline: none; }
.read-search input::placeholder { color: var(--lz-muted); }
.read-search__status { flex: 1 0 100%; color: var(--lz-secondary); font: 500 14px/1.5 var(--lz-body); }
.read-search__status:not(:empty) { padding: 9px 0 11px; border-top: 1px solid var(--lz-border); }
.lz-ui .qa .lz-disclosure { margin-top: 0; }
.lz-ui .qa .lz-disclosure:last-child { border-bottom: 1px solid var(--lz-border); }
.lz-ui .qa .lz-disclosure > summary { min-height: 60px; font: 700 20px/1.3 var(--lz-heading); letter-spacing: .02em; transition: color var(--lz-feedback) var(--lz-settle); }
/* A chevron in place of the component's plus sign: it turns over when the answer opens. */
.lz-ui .qa .lz-disclosure > summary::after { content: ''; flex: none; width: 9px; height: 9px; margin-right: 6px; border: solid var(--lz-accent); border-width: 0 2px 2px 0; rotate: 45deg; translate: 0 -2px; transition: rotate var(--lz-feedback) var(--lz-settle), translate var(--lz-feedback) var(--lz-settle); }
.lz-ui .qa .lz-disclosure[open] > summary::after { content: ''; rotate: 225deg; translate: 0 3px; }
.lz-ui .qa .lz-disclosure__content { max-width: 42em; padding-bottom: 22px; }
.lz-ui .qa .lz-disclosure__content :is(p, li) { color: var(--lz-secondary); font: 400 16px/1.65 var(--lz-body); }
.lz-ui .qa .lz-disclosure__content p + :is(p, ul) { margin-top: 10px; }

/* ---------- the panel that closes a page ---------- */
.lz-ui .read-help { display: grid; justify-items: start; gap: 10px; margin-top: 56px; }
.read-help h2 { font: 700 var(--lz-size-panel)/var(--lz-leading-heading) var(--lz-heading); letter-spacing: .02em; text-transform: uppercase; }
.read-help p { max-width: 36em; margin-bottom: 8px; color: var(--lz-secondary); font: 400 16px/1.65 var(--lz-body); }
/* On the FAQ the panel is a child of the grid, not of the text column: it closes the page as before, and on
   wide screens it stands beside the questions with a picture and stays in view. */
.read > .read-help { grid-column: 2; max-width: 720px; }
.read-help__art { display: none; }
.read-help__more { display: inline-flex; align-items: center; min-height: 44px; color: var(--lz-secondary); font: 700 14px/1.3 var(--lz-heading); letter-spacing: .1em; text-transform: uppercase; text-decoration: underline; text-decoration-color: var(--lz-accent); text-underline-offset: 5px; transition: color var(--lz-feedback) var(--lz-settle); }
/* Only where the window is tall enough to hold the panel beside the text: in a short one (a laptop at 150%
   scaling is about 1280 by 560) it stays under the questions, where the keyboard reaches it in reading order. */
@media (min-width: 1200px) and (min-height: 561px) {
  .read--aside { grid-template-columns: 220px minmax(0, 1fr) 256px; gap: 0 40px; }
  .lz-ui .read > .read-help { grid-column: 3; grid-row: 1; position: sticky; top: calc(var(--read-top) + 30px); gap: 8px; margin-top: 0; padding: 0 20px 14px; overflow: hidden; }
  .read > .read-help .read-help__art { display: block; width: calc(100% + 40px); max-width: none; height: 132px; margin: 0 -20px 10px; border-bottom: 2px solid var(--lz-accent); object-fit: cover; object-position: 62% 60%; filter: saturate(.94) brightness(.92); }
  .read > .read-help h2 { font-size: 24px; }
  .read > .read-help p { margin-bottom: 4px; font-size: 15px; }
  .lz-ui .read > .read-help .lz-button { justify-self: stretch; }
}

/* ---------- staff application: one state at a time, then the form ---------- */
.read-state { display: grid; justify-items: start; gap: 12px; animation: readArrive var(--lz-arrive) var(--lz-settle) both; }
.read-state h2 { font: 700 var(--lz-size-panel)/var(--lz-leading-heading) var(--lz-heading); letter-spacing: .02em; text-transform: uppercase; }
.read-state p { max-width: 38em; color: var(--lz-secondary); font: 400 16px/1.65 var(--lz-body); }
.read-state p strong { color: var(--lz-text); font-weight: 600; }
.read-state .lz-button { margin-top: 8px; }
.read-steps { display: flex; flex-wrap: wrap; gap: 10px 0; margin: 28px 0 22px; list-style: none; counter-reset: step; }
.read-steps li { counter-increment: step; display: flex; align-items: center; gap: 8px; color: var(--lz-muted); font: 700 14px/1.2 var(--lz-heading); letter-spacing: .1em; text-transform: uppercase; }
.read-steps li::before { content: counter(step); display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--read-control); color: var(--lz-text); font: 700 14px/1 var(--lz-heading); letter-spacing: 0; }
.read-steps li:not(:last-child)::after { content: ''; width: 14px; height: 1px; margin: 0 8px 0 0; background: var(--read-control); }
/* Wide screens: the steps stand in the rail, where the other reading pages keep their index. */
@media (min-width: 901px) {
  .read-steps { position: sticky; top: calc(var(--read-top) + 30px); display: grid; gap: 0; margin: 0; }
  .read-steps li { position: relative; min-height: 52px; align-items: flex-start; padding-top: 0; line-height: 26px; }
  .read-steps li:not(:last-child)::after { position: absolute; left: 13px; top: 30px; bottom: 4px; width: 1px; height: auto; margin: 0; }
}
.read-steps .is-done { color: var(--lz-secondary); }
.read-steps .is-done::before { content: '\2713'; border-color: var(--lz-accent); background: var(--lz-accent); color: #112007; }
.read-steps [aria-current] { color: var(--lz-text); }
.read-steps [aria-current]::before { border-color: var(--lz-accent); color: var(--lz-accent); }
/* The tick draws once when an application has gone in. */
.read-tick { width: 48px; height: 48px; border: 2px solid var(--lz-accent); fill: none; stroke: var(--lz-accent); stroke-width: 4; stroke-linecap: square; stroke-dasharray: 1; }
#stateSubmitted .read-tick path { animation: readTick 480ms var(--lz-settle) .2s both; }

.read-form { color-scheme: dark; }
.lz-ui .read-form .lz-state { margin-top: 18px; color: var(--lz-secondary); overflow-wrap: anywhere; }
.read-form .lz-state strong { color: var(--lz-text); }
.read-form fieldset { min-width: 0; margin-top: 36px; padding-top: 26px; border: 0; border-top: 1px solid var(--lz-border); }
.read-form legend { float: left; width: 100%; margin-bottom: 2px; color: var(--lz-text); font: 700 var(--lz-size-panel)/var(--lz-leading-heading) var(--lz-heading); letter-spacing: .02em; text-transform: uppercase; }
.read-form legend + * { clear: both; margin-top: 0; padding-top: 16px; }
.read-form legend .lz-kicker { margin-bottom: 4px; }
.read-field { display: grid; gap: 8px; margin-top: 22px; }
.read-field__label { color: var(--lz-text); font: 600 16px/1.5 var(--lz-body); }
.read-field__req { color: var(--lz-accent); }
.read-field :is(input, textarea, select) { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--read-control); border-radius: var(--lz-radius); background: #0b0d0a; color: var(--lz-text); font: 400 16px/1.5 var(--lz-body); transition: border-color var(--lz-feedback) var(--lz-settle); }
.read-field textarea { min-height: 124px; resize: vertical; }
.lz-ui .read-field :is(input, textarea, select):focus-visible { border-color: var(--lz-accent); outline-offset: 2px; }
.read-field [aria-invalid="true"] { border-color: var(--lz-danger); }
.read-form__end { display: grid; justify-items: start; gap: 14px; margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--lz-border); }
.read-form__note { color: var(--lz-muted); font: 400 var(--lz-size-compact)/1.5 var(--lz-body); }

/* ---------- movement ---------- */
@keyframes readSettle { from { scale: 1.05; } }
@keyframes readProgress { from { transform: scaleX(0); } }
@keyframes readArrive { from { opacity: 0; translate: 0 8px; } }
@keyframes readTick { from { stroke-dashoffset: 1; } }
@media (hover: hover) and (pointer: fine) {
  .read-index a:hover, .lz-ui .qa .lz-disclosure > summary:hover, .read-help__more:hover { color: var(--lz-accent); }
  .read-field :is(input, textarea, select):hover { border-color: var(--lz-muted); }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  /* Answers open over 320ms and close faster (160ms). The browser sizes them itself; where it cannot,
     they open at once. A question worked from the keyboard opens at once too. */
  @supports selector(::details-content) {
    .qa .lz-disclosure { interpolate-size: allow-keywords; }
    .qa .lz-disclosure::details-content { block-size: 0; overflow: clip; opacity: 0; transition: block-size var(--lz-exit) var(--lz-settle), opacity var(--lz-exit) linear, content-visibility var(--lz-exit) allow-discrete; }
    .qa .lz-disclosure[open]::details-content { block-size: auto; opacity: 1; transition-duration: var(--lz-arrive); }
    .qa .lz-disclosure:has(> summary:focus-visible)::details-content { transition: none; }
  }
}

/* ---------- smaller screens: the index becomes a bar under the menu ---------- */
@media (max-width: 1060px) { :root { --read-top: 80px; } }
@media (max-width: 900px) {
  html { scroll-padding-top: calc(var(--read-top) + 76px); }
  .read { display: block; padding: 0 0 64px; }
  .read-index { top: var(--read-top); z-index: 20; display: flex; gap: 2px; margin: 0 -4vw 28px; padding: 0 4vw; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; border: 0; border-bottom: 1px solid var(--lz-border); background: var(--lz-ink); }
  .read-index::-webkit-scrollbar { display: none; }
  .read-index::after { display: none; }
  .read-index a { flex: none; padding: 6px 10px; border-bottom: 2px solid transparent; white-space: nowrap; }
  /* The bar keeps names only: with the drawings the Rules bar no longer fitted a tablet, and a phone showed fewer chapters. */
  .read-index .read-icon { display: none; }
  .read-index a[aria-current] { border-bottom-color: var(--lz-accent); color: var(--lz-accent); }
}
@media (max-width: 760px) {
  .read-hero { padding: calc(var(--read-top) + 30px) 0 26px; }
  .read-hero__art { width: 100%; filter: saturate(.9) brightness(.46); -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 96%); mask-image: linear-gradient(180deg, #000 30%, transparent 96%); }
  .read-hero__lede { max-width: none; font-size: 17px; }
  .read-rules li { padding-left: 50px; }
  /* The drawing sits on the label's line, so the short version keeps the card's whole width. */
  .read-gist { position: relative; display: block; padding: 13px 15px 14px 14px; }
  .read-gist .read-icon { position: absolute; left: 14px; top: 13px; width: 20px; height: 20px; margin: 0; }
  .read-gist__label { margin-bottom: 6px; padding-left: 30px; line-height: 20px; }
  .lz-ui .read-help .lz-button, .lz-ui .read-state .lz-button, .lz-ui .read-form__end .lz-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .read-hero__art, .read-state, #stateSubmitted .read-tick path { animation: none; }
  .read-index a, .read-index .read-icon, .read-index::after, .lz-ui .qa .lz-disclosure > summary, .lz-ui .qa .lz-disclosure > summary::after, .read-field :is(input, textarea, select), .read-help__more { transition: none; }
}
