/* Long-form document styling for the generated legal pages.
   Loaded after main.css and ONLY on those pages, so the marketing pages do not
   carry it.

   Everything is scoped under `.doc` (the body class build.mjs emits for the
   Intellayer chrome) because the generator's markup uses `.section`, which
   main.css already defines as a padded flex column for marketing sections.
   Without the scope the two collide; with it, the more specific rule wins and
   the intent stays readable.

   Colours come from main.css's custom properties rather than a second palette
   -- that is the whole point of the exercise: a contract page should look like
   the site that sold it. */

.doc { background: var(--panel); }

.doc .container { max-width: 1080px; margin: 0 auto; padding: 0 var(--pad); }

.doc .skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--indigo);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 10px 0;
  font-weight: 700;
  z-index: 100;
}
.doc .skip-link:focus { left: 0; color: #fff; }

/* Overrides main.css's marketing `.section`. */
.doc .section { display: block; padding: 20px 0 72px; max-width: none; gap: 0; }

.doc .page-head { padding: 56px 0 8px; }
.doc .page-head-inner,
.doc .prose { max-width: 760px; margin: 0 auto; }

.doc .crumbs { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.doc .crumbs a { color: var(--muted); }
.doc .crumbs a:hover { color: var(--ink); }
.doc .crumbs span { padding: 0 6px; }

.doc h1 {
  font-size: clamp(30px, 4.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  color: var(--ink);
}
.doc .lead { font-size: 19px; line-height: 1.6; color: var(--body); margin: 0; }

/* ------------------------------------------------------------------ prose */
.doc .prose > *:first-child { margin-top: 0; }
.doc .prose p,
.doc .prose li { font-size: 17px; line-height: 1.7; color: var(--body); }

.doc .prose h2 {
  font-size: clamp(23px, 3.2vw, 30px);
  margin: 1.9em 0 .55em;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.doc .prose h3 { font-size: 19px; margin: 1.7em 0 .5em; color: var(--ink); }
.doc .prose h4 { font-size: 16px; margin: 1.5em 0 .4em; color: var(--ink); }

.doc .prose ul,
.doc .prose ol { margin: 0 0 1.15em; padding-left: 22px; }
.doc .prose li { margin-bottom: 9px; }
.doc .prose li p { margin: .5em 0 0; }
.doc .prose strong { color: var(--ink); font-weight: 700; }

/* Underlined in body copy: in a contract, a link needs to be unmistakable
   without relying on colour alone. */
.doc .prose a { color: var(--indigo-dark); text-decoration: underline; text-underline-offset: 2px; }
.doc .prose a:hover { color: var(--indigo); }

.doc .prose code {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: .9em;
}
.doc .prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

.doc .prose-table { overflow-x: auto; margin: 0 0 1.3em; }
.doc .prose-table table { width: 100%; border-collapse: collapse; font-size: 16px; min-width: 460px; }
.doc .prose-table th,
.doc .prose-table td {
  text-align: left;
  padding: 11px 14px;
  border: 1px solid var(--line);
  color: var(--body);
  vertical-align: top;
}
.doc .prose-table th { background: var(--bg); color: var(--ink); font-weight: 700; font-size: 15px; }

.doc .prose-note {
  background: var(--indigo-50);
  border-left: 3px solid var(--indigo);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin: 0 0 1.3em;
}
.doc .prose-note p { margin: 0; font-size: 16px; }
.doc .prose-note p + p { margin-top: .7em; }

.doc .prose-meta { font-size: 14px; color: var(--muted); margin-bottom: 2em; }

/* The language switch only exists on these pages -- the marketing pages are
   English-only -- so it lives here rather than in main.css. */
.nav__lang { font-weight: 700; letter-spacing: .04em; }

@media (max-width: 720px) {
  .doc .prose p,
  .doc .prose li { font-size: 16px; }
  .doc .page-head { padding-top: 36px; }
  .doc .section { padding-bottom: 48px; }
}

/* A URL written out in the text (the sub-processor register, for one) is one
   unbreakable word wider than a phone screen; let links break where needed. */
.doc .prose a { overflow-wrap: anywhere; }
