/* Словолов — document pages (privacy, terms, support, 404).
 *
 * One reading column of Literata over the paper, the same header and footer as
 * the landing. The `md-*` classes are emitted by the server-side markdown
 * renderer (app/services/site_markdown.py); this file is the whole visual
 * contract for them.
 */

.doc-main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 40px 24px 0;
}

.doc-body {
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.doc-updated {
  margin: 0 0 32px;
  font-family: var(--serif);
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--ink-soft);
}

.md-h1 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(1.875rem, 5vw, 2.375rem);
  font-weight: 600;
  line-height: 1.15;
}

.md-h2 {
  margin: 40px 0 12px;
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.25;
}

.md-h3 {
  margin: 28px 0 10px;
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 600;
}

.md-h4 {
  margin: 22px 0 8px;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
}

.md-p {
  margin: 0 0 14px;
}

.md-ul,
.md-ol {
  margin: 0 0 14px;
  padding-left: 26px;
}

.md-li {
  margin: 6px 0;
}

.md-quote {
  margin: 0 0 14px;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--accent);
  color: var(--ink-2);
}

.md-quote .md-p:last-child {
  margin-bottom: 0;
}

.md-code {
  padding: 1px 6px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: color-mix(in srgb, var(--ink-faint) 16%, transparent);
  border-radius: var(--radius-word);
}

.md-strong {
  font-weight: 600;
}

.md-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.md-link:hover {
  text-decoration-thickness: 2px;
}

/* The horizontal rule as notebook punctuation: a hairline with one wax dot. */

.md-hr {
  position: relative;
  height: 1px;
  margin: 36px 0;
  border: 0;
  background: var(--hairline);
}

.md-hr::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  width: 7px;
  height: 7px;
  transform: translateX(-50%);
  background: var(--accent);
  border-radius: 50%;
}

/* --- the 404 page --------------------------------------------------------- */

.notfound {
  max-width: 34rem;
  margin: 0 auto;
  padding: 96px 24px 0;
  text-align: center;
}

.notfound h1 {
  margin: 24px 0 8px;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 600;
}

.notfound p {
  margin: 0 0 28px;
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-style: italic;
  color: var(--ink-2);
}

.notfound a {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.notfound a:hover {
  text-decoration: underline;
}

.notfound-mark {
  width: 150px;
  height: auto;
}

.notfound-mark .ring {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.68;
}

.notfound-mark .drop {
  fill: var(--accent);
}

/* --- the beta page (/beta) ------------------------------------------------
 *
 * Two numbered steps, in order, each ending in the button that performs it —
 * the page is an instruction, so nothing separates a step from its door. The
 * numerals are the dictionary's sense numbers, borrowed: same ring, same wax.
 */

.beta-lead {
  margin: 0 0 8px;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink-2);
}

.beta-steps {
  margin: 32px 0 40px;
  padding: 0;
  list-style: none;
  counter-reset: beta-step;
}

.beta-step {
  position: relative;
  margin: 0 0 32px;
  padding-left: 58px;
}

.beta-step::before {
  counter-increment: beta-step;
  content: counter(beta-step);
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 50%;
}

.beta-step-title {
  margin: 4px 0 10px;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.beta-cta {
  display: inline-block;
  margin-top: 4px;
  padding: 11px 22px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--paper);
  text-decoration: none;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.beta-cta:hover {
  background: color-mix(in srgb, var(--accent) 86%, var(--ink));
  border-color: color-mix(in srgb, var(--accent) 86%, var(--ink));
}

.beta-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* The iOS line at the foot: a real door, but not one this page is about. */

.beta-cta-quiet {
  color: var(--accent);
  background: transparent;
  border-color: var(--hairline);
}

.beta-cta-quiet:hover {
  color: var(--paper);
  background: var(--accent);
  border-color: var(--accent);
}

.beta-foot {
  margin: 40px 0 12px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

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