/* ==========================================================================
   EXALTED — Birthday hub — rules / terms pages
   Loaded alongside style.css, which supplies the design tokens, @font-face
   rules and the .grain / .mark / .eyebrow / .title / .foot components this
   file builds on. Nothing here redefines a token — it only adds the layout
   and typography needed for long-form legal text.
   ========================================================================== */

.doc-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  padding: clamp(1.5rem, 4vh, 2.5rem) var(--gutter) 0;
}

.doc-top__link {
  display: block;
  line-height: 0;
}

.doc-top .mark {
  width: clamp(4.5rem, 7vw, 5.5rem);
}

.doc {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 46rem;
  margin-inline: auto;
  padding: clamp(2rem, 5vh, 3rem) var(--gutter) clamp(3rem, 7vh, 4.5rem);
}

/* The ticket-positions appendix (en/rules) is a single wide table rather
   than prose, so it gets more breathing room than the measure that suits
   long-form paragraphs. */
.doc--wide { max-width: 64rem; }

.doc__back {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: clamp(2rem, 5vh, 3rem);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-decoration: none;
  transition: color 0.35s var(--ease);
}
.doc__back::before {
  content: "";
  width: 1.15rem;
  height: 1px;
  background: currentColor;
}
.doc__back:hover { color: var(--ink); }

/* Left-align the shared .eyebrow / .title components for a document layout
   rather than the homepage's centred hero. */
.doc .eyebrow {
  justify-content: flex-start;
  margin-bottom: 1.1rem;
}
.doc .eyebrow::before { display: none; }
.doc .eyebrow::after { transform: none; }

.doc .title {
  text-align: left;
  text-wrap: pretty;
  font-size: clamp(1.625rem, 4vw, 2.5rem);
}

.doc .subtitle { text-align: left; }

.doc__intro {
  margin-bottom: clamp(2.5rem, 6vh, 3.5rem);
}

/* The legal document's own title + date range, exactly as printed on the
   PDF — demoted below the page's marketing h1 so there is only one h1,
   but still set apart from the numbered clauses as the document's header. */
.doc__doctitle {
  margin: 0 0 clamp(1.9rem, 4.5vh, 2.6rem);
  padding-bottom: clamp(1.9rem, 4.5vh, 2.6rem);
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.1875rem, 2.2vw, 1.5rem);
  line-height: 1.3;
}

.doc__dates {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.doc__body { text-align: left; }

.doc__body section + section {
  margin-top: clamp(1.9rem, 4.5vh, 2.6rem);
  padding-top: clamp(1.9rem, 4.5vh, 2.6rem);
  border-top: 1px solid var(--line);
}

.doc__body h2 {
  margin: 0 0 0.75rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.0625rem, 1.7vw, 1.3125rem);
  letter-spacing: -0.003em;
}

.doc__body p {
  margin: 0 0 1rem;
  color: var(--ink);
}
.doc__body p:last-child { margin-bottom: 0; }

.doc__list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.doc__list li {
  display: flex;
  gap: 0.7rem;
}
.doc__marker {
  flex: none;
  color: var(--ink-faint);
}

.doc__table-wrap {
  margin: 1.25rem 0;
  border: 1px solid var(--line);
  overflow-x: auto;
}

.doc__table {
  width: 100%;
  min-width: 32rem;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.doc__table th,
.doc__table td {
  padding: 0.65rem 0.9rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.doc__table th {
  font-weight: 400;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--bg-deep);
}
.doc__table tbody tr:last-child td { border-bottom: 0; }

.doc__sign {
  margin-top: clamp(2.5rem, 6vh, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 0.875rem;
}

/* Ticket-positions appendix (en/rules): 540 rows, 4 order/ticket pairs per
   row, same as the source PDF's layout — figures need to line up, hence
   tabular-nums instead of the body's proportional numerals. */
.doc__table--positions {
  min-width: 40rem;
  font-variant-numeric: tabular-nums;
}
.doc__table--positions td:nth-child(odd),
.doc__table--positions th:nth-child(odd) { text-align: right; }
