/* IPRPS Lite pages. Builds on ../assets/css/site.css (same palette, type and themes). */

.lite .nav a[aria-current="page"] { color: var(--link); background: var(--raise); }
.btn__meta { font-weight: 500; opacity: .8; }
.btn--static { cursor: default; opacity: .85; }
.btn--static:hover { border-color: var(--line); color: var(--text); }
.also { margin-top: 24px; color: var(--mist); }
.split--top { align-items: start; }

.lite-cover { margin: 0; }
.lite-cover img { display: block; width: 100%; height: auto; border-radius: var(--r-m); border: 1px solid var(--line); box-shadow: var(--shadow); }
.lite-cover figcaption { text-align: center; color: var(--mist); font-style: italic; margin-top: 10px; }

/* ---------- Tables (shared by the landing page and the rules) ---------- */
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 22px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--panel); }
.tbl table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl caption { text-align: left; caption-side: top; padding: 12px 14px 8px; font: 700 .82rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--teal); }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 9px 14px; border-top: 1px solid var(--line); }
.tbl thead th { background: var(--raise); color: var(--link); font-weight: 700; border-top: 1px solid var(--line); white-space: nowrap; }
.tbl tbody th { font-weight: 700; color: var(--text); }
.tbl tbody tr:nth-child(even) td, .tbl tbody tr:nth-child(even) th { background: rgba(127, 127, 160, .06); }
.tbl td.blank { height: 2.2em; }

/* ---------- Reading layout ---------- */
.doc { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 48px; max-width: 1240px; margin: 0 auto; padding: 40px 24px 80px; }
.doc__nav { position: -webkit-sticky; position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; scrollbar-width: thin; }
.doc__nav summary { font: 700 .8rem/1 var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--teal); cursor: pointer; padding: 6px 0 12px; list-style: none; }
.doc__nav summary::-webkit-details-marker { display: none; }
.toc { list-style: none; margin: 0; padding: 0; counter-reset: ch; }
.toc > li { counter-increment: ch; margin: 2px 0; }
.toc > li > a { display: block; padding: 6px 10px; border-radius: var(--r-s); color: var(--text); text-decoration: none; font-weight: 700; font-size: .95rem; }
.toc > li > a::before { content: counter(ch) ". "; color: var(--teal); font-family: var(--mono); font-size: .8rem; }
.toc ol { list-style: none; margin: 0 0 6px; padding: 0 0 0 22px; }
.toc ol a { display: block; padding: 3px 10px; color: var(--mist); text-decoration: none; font-size: .88rem; border-radius: var(--r-s); }
.toc a:hover, .toc a.is-on { background: var(--raise); color: var(--link); }
.doc__dl { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }

.doc__head { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 10px; }
.doc__head h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
.doc__head h1 em { font-style: normal; color: var(--gold); }
.legal { margin-top: 14px; font-size: .95rem; color: var(--mist); }
.legal summary { cursor: pointer; color: var(--link); font-weight: 700; }
.legal p { margin-top: 10px; }
.doc__end { margin-top: 40px; color: var(--mist); }

.rules { max-width: 78ch; }
.rules .chapter { padding-top: 34px; scroll-margin-top: 80px; }
.rules .chapter > h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); border-bottom: 2px solid var(--gold); padding-bottom: 10px; }
.rules .chapter > h2 .num { color: var(--gold); }
.rules h3 { font-size: 1.45rem; margin-top: 1.6em; scroll-margin-top: 80px; }
.rules h4 { font: 700 1.05rem var(--sans); color: var(--teal); }
.rules p, .rules li { line-height: 1.7; }
.rules ul, .rules ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.rules li { margin-bottom: .4em; }
.rules strong { color: var(--text); }

.box { border-left: 4px solid var(--gold); background: var(--panel); border-radius: 0 var(--r-m) var(--r-m) 0; padding: 14px 18px; margin: 0 0 22px; }
.box--rule { border-left-color: var(--teal); }
.box p { margin: 0 0 .5em; }
.box p:last-child { margin-bottom: 0; }
.box__t { font-weight: 700; color: var(--link); }

.art { margin: 6px 0 24px; }
.art img { display: block; height: auto; border-radius: var(--r-m); border: 1px solid var(--line); }
.art--wide img { width: 100%; }
.art--side { float: right; width: 34%; max-width: 240px; margin: 0 0 16px 24px; }
.art--side img { width: 100%; }
.rules .chapter::after { content: ""; display: table; clear: both; }

@media (max-width: 1020px) {
  .doc { grid-template-columns: 1fr; gap: 20px; padding-top: 24px; }
  .doc__nav { position: static; max-height: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px 16px; }
  .doc__nav summary::after { content: " ▾"; }
  .doc__nav details:not([open]) summary { padding-bottom: 6px; }
}
@media (max-width: 560px) {
  .art--side { float: none; width: 60%; margin: 0 auto 18px; }
  .tbl th, .tbl td { padding: 8px 10px; }
  .tbl thead th { white-space: normal; }
}

@media print {
  .doc { display: block; padding: 0; }
  .doc__nav, .doc__end, .legal summary { display: none; }
  .legal { display: block; }
  .rules { max-width: none; }
  .rules .chapter { break-before: page; }
  .tbl { border-color: #999; overflow: visible; }
  .tbl thead th { background: #eee !important; color: #000; }
  .box { border: 1px solid #999; }
  .art--wide img { max-height: 3in; width: auto; }
}
