/* The legal pages (privacy, terms, rights) in the landing's clothes. Tokens,
   faces, the header, the footer, buttons and the language picker come from
   site.css; this file is the document: a column of text with the three
   documents and a contents list beside it on a desk. Every rule here is for
   reading, so no motion. */

.doc { padding: calc(var(--top-h) + clamp(40px, 6vw, 72px)) 0 clamp(80px, 10vw, 128px); }
.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; }
@media (min-width: 980px) {
  .doc-grid { grid-template-columns: 220px minmax(0, 720px); gap: 80px; align-items: start; }
  .doc-aside { position: sticky; top: calc(var(--top-h) + 40px); }
}

/* the three documents: a list with a sakura bar on a desk, chips on a phone */
.doc-nav { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.doc-nav a {
  position: relative; padding: 14px 0 14px 16px; border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 15px; line-height: 1.3; color: var(--text-2); text-decoration: none;
}
.doc-nav a:hover { color: var(--text); }
.doc-nav a[aria-current='page'] { color: var(--text); }
.doc-nav a[aria-current='page']::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; background: var(--pink); }
.toc-box { margin-top: 40px; }
.toc-box[hidden] { display: none; }
.toc { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.toc a { display: block; font-size: 14px; line-height: 1.4; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); }
@media (max-width: 979px) {
  /* all three always in sight: they wrap rather than scroll away */
  .doc-nav { flex-direction: row; flex-wrap: wrap; gap: 8px; border: 0; }
  .doc-nav a { flex: 0 0 auto; padding: 10px 14px; border: 1px solid var(--border-2); border-radius: 3px; font-size: 14px; white-space: nowrap; }
  .doc-nav a[aria-current='page'] { background: var(--pink); border-color: var(--pink); color: var(--on-pink); }
  .doc-nav a[aria-current='page']::before { display: none; }
  .toc-box { display: none; }
}

/* one section per language: the <head> script's pick shows before first
   paint, and English is what a page without scripts shows */
section[data-lang] { display: none; }
html:not([data-lang]) section[data-lang='en'],
html[data-lang='en'] section[data-lang='en'],
html[data-lang='ja'] section[data-lang='ja'],
html[data-lang='ko'] section[data-lang='ko'],
html[data-lang='zh-Hant'] section[data-lang='zh-Hant'],
html[data-lang='zh'] section[data-lang='zh'],
html[data-lang='es'] section[data-lang='es'],
html[data-lang='pt'] section[data-lang='pt'] { display: block; }

/* ── the document ──────────────────────────────────────────────────────── */
.doc-body h1 {
  font-weight: 900; letter-spacing: var(--track); line-height: 1.05; text-wrap: balance;
  font-size: calc(clamp(40px, 5.6vw, 76px) * var(--hs));
}
:lang(ja) .doc-body h1, :lang(ko) .doc-body h1, :lang(zh) .doc-body h1 { line-height: 1.2; }
.doc-body .updated {
  margin-top: 20px; font-family: var(--mono); font-weight: 500; font-size: 13px; line-height: 1.4;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
:lang(ja) .doc-body .updated, :lang(ko) .doc-body .updated, :lang(zh) .doc-body .updated { letter-spacing: 0.06em; }
.doc-body h2 {
  margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border);
  font-weight: 800; font-size: clamp(20px, 1.9vw, 24px); line-height: 1.3; letter-spacing: -0.01em;
  color: var(--text); text-wrap: balance;
  scroll-margin-top: calc(var(--top-h) + 24px);
}
.doc-body p, .doc-body li { font-size: 16px; line-height: 1.75; color: var(--text-2); }
@media (min-width: 720px) { .doc-body p, .doc-body li { font-size: 17px; } }
.doc-body p { margin-top: 16px; }
.doc-body .updated + p { margin-top: 32px; }
.doc-body strong { color: var(--text); font-weight: 700; }
.doc-body ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.doc-body li { position: relative; padding-left: 22px; }
/* square bullets, like everything else here that is not a person */
.doc-body li::before { content: ''; position: absolute; left: 2px; top: calc(0.875em - 3px); width: 6px; height: 6px; background: var(--faint); }
.doc-body a {
  color: var(--text); text-decoration: underline; text-decoration-color: var(--pink);
  text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere;
}
.doc-body a:hover { color: var(--pink); }
.doc-body code {
  font-family: var(--mono); font-size: 0.86em; padding: 1px 6px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 3px; color: var(--text);
}
.doc-body .note {
  margin-top: 24px; padding: 14px 16px; font-size: 15px; line-height: 1.6;
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px; color: var(--text-2);
}

/* ── the rights holders' form, in the waitlist form's parts ────────────── */
.claim { position: relative; margin-top: 32px; display: grid; gap: 16px; max-width: 580px; }
.claim label { display: grid; gap: 8px; font-size: 14px; line-height: 1.4; color: var(--text-2); }
.claim input, .claim textarea {
  width: 100%; font: inherit; font-size: 16px; /* 16 is the floor: smaller makes iOS Safari zoom on focus */
  color: var(--text); caret-color: var(--pink);
  background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 3px;
}
.claim input { height: 54px; padding: 0 16px; }
.claim textarea { min-height: 148px; padding: 14px 16px; line-height: 1.5; resize: vertical; }
.claim input:hover, .claim textarea:hover { border-color: var(--muted); }
.claim input:focus, .claim textarea:focus { outline: none; border-color: var(--pink); }
.claim .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.claim button {
  justify-self: start; height: 54px; padding: 0 30px; border: 0;
  background: var(--pink); color: var(--on-pink); font-weight: 700; font-size: 16px; line-height: 1;
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 0 100%);
}
.claim button:hover { background: var(--pink-hover); }
.claim button:active { background: var(--pink-press); }
.claim button:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--on-pink); }
.claim button[disabled] { opacity: 0.55; cursor: progress; }
.doc-body .claim .status { margin: 0; min-height: 1.5em; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.doc-body .claim .status.ok { color: var(--text); }
.doc-body .claim .status.err { color: var(--danger); }
@media (max-width: 559px) { .claim button { justify-self: stretch; } }

/* ── on paper: the document alone, in black on white ───────────────────── */
@media print {
  body { background: #fff; color: #111; }
  .top, .foot, .doc-aside, .skip, .claim { display: none !important; }
  .doc { padding: 0; }
  .doc-grid { display: block; }
  .doc-body h1, .doc-body h2, .doc-body strong, .doc-body a { color: #111; }
  .doc-body p, .doc-body li, .doc-body .note, .doc-body .updated { color: #333; }
  .doc-body h2 { border-top-color: #ccc; }
  .doc-body .note { background: none; border-color: #ccc; }
}
