/* Rateios — layout of the páreo ledger; tables, tags, notices from components.css. */

.rt-wait { margin-bottom: var(--space-24); }
.rt-wait a { color: var(--color-ink); text-underline-offset: 3px; }

.rt-group + .rt-group { margin-top: clamp(40px, 5vw, 72px); }
.rt-group__head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-12) var(--space-24);
  padding-bottom: var(--space-16); border-bottom: 2px solid var(--color-ink);
}
.rt-group__head h3 {
  font-family: var(--font-display); font-stretch: 80%; font-weight: 800; font-size: var(--fs-h3);
  text-transform: uppercase; line-height: 1.05;
}
.rt-group__head h3 span { color: var(--color-muted-light); font-weight: 600; }
.rt-group__link, .rt-item__link {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap);
  font-weight: 600; font-size: var(--fs-small); text-decoration: none; color: var(--color-ink);
  transition: color var(--dur-fast);
}
.rt-group__link:hover, .rt-item__link:hover { color: var(--color-data-light); }
.rt-group__link .icon, .rt-item__link .icon { width: 18px; height: 18px; }

.rt-item {
  display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: var(--space-24) var(--space-48);
  align-items: start; padding-block: var(--space-24); border-bottom: 1px solid var(--line-light-strong);
}
.rt-item__meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-16); align-items: start; }
.rt-item__title {
  font-family: var(--font-display); font-stretch: 80%; font-weight: 800; font-size: 1.375rem;
  text-transform: uppercase; line-height: 1.05;
}
.rt-item__sub { margin-top: 6px; font: var(--fs-small) var(--font-mono); color: var(--color-muted-light); }
.rt-item__win { margin-top: 12px; font-weight: 700; overflow-wrap: anywhere; }
.rt-item__win span { font: 400 var(--fs-small) var(--font-mono); color: var(--color-muted-light); }
.rt-item__win span:first-child { display: block; font-size: var(--fs-micro); letter-spacing: .06em; text-transform: uppercase; }
.rt-item__link { margin-top: 4px; }

.rt-tbl td { padding-block: 10px; }
.rt-tbl .rt-val { font-size: 1.125rem; font-weight: 500; }
.rt-tbl th:last-child, .rt-tbl td:last-child { width: 1%; }

/* como ler */
.rt-read { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--space-24) clamp(32px, 6vw, 96px); align-items: start; }
.rt-read__text .sec__intro:first-child { margin-top: 0; }
.rt-read__text b { color: var(--color-text); font-weight: 500; }

/* modalidades */
.rt-mods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-dark-strong); }
.rt-mods div { padding: var(--space-24) var(--space-24) var(--space-24) 0; border-bottom: 1px solid var(--line-dark); }
.rt-mods div:not(:nth-child(3n + 1)) { padding-left: var(--space-24); border-left: 1px solid var(--line-dark); }
.rt-mods dt {
  font-family: var(--font-display); font-stretch: 80%; font-weight: 800; font-size: 1.25rem;
  text-transform: uppercase; line-height: 1.1;
}
.rt-mods dd { margin: 10px 0 0; color: var(--color-muted); font-size: var(--fs-small); }
.sec:not(.sec--light) .rt-note { color: var(--color-muted); margin-top: var(--space-24); }

@media (max-width: 1100px) {
  .rt-item { grid-template-columns: minmax(0, 1fr); }
  .rt-mods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rt-mods div:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .rt-mods div:nth-child(even) { padding-left: var(--space-24); border-left: 1px solid var(--line-dark); }
}
@media (max-width: 860px) {
  .rt-read { grid-template-columns: minmax(0, 1fr); }
  /* a four-column ledger stays a table: cards would repeat «Oficial» six times per páreo */
  .rt-item .tbl-wrap { background: var(--color-surface-white); border: 1px solid var(--line-light); }
  .rt-tbl { display: table; }
  .rt-tbl thead { display: table-header-group; }
  .rt-tbl tbody { display: table-row-group; }
  .rt-tbl tbody tr { display: table-row; padding: 0; border: 0; background: none; }
  .rt-tbl th, .rt-tbl td, .rt-tbl td.cav { display: table-cell; padding: 10px 12px; margin: 0; border-bottom: 1px solid var(--line-light); }
  .rt-tbl tbody tr:last-child td { border-bottom: 0; }
  .rt-tbl td[data-label]::before { display: none !important; }
  .rt-tbl .r { text-align: right; }
}
@media (max-width: 600px) {
  .rt-tbl th, .rt-tbl td, .rt-tbl td.cav { padding: 10px 6px; }
  .rt-tbl th:first-child, .rt-tbl td:first-child { padding-left: 12px; }
  .rt-tbl th:last-child, .rt-tbl td:last-child { padding-right: 10px; }
  .rt-tbl th { letter-spacing: .02em; }
  .rt-tbl .tag { padding: 6px 7px; gap: 5px; }
  .rt-tbl .tag .icon { width: 13px; height: 13px; }
  .rt-tbl .rt-val { font-size: 1rem; }
}
@media (max-width: 389px) {
  .rt-tbl .tag .icon { display: none; }
  .rt-tbl td.m { font-size: .8125rem; }
}
@media (max-width: 600px) {
  .rt-mods { grid-template-columns: minmax(0, 1fr); }
  .rt-mods div:nth-child(even) { padding-left: 0; border-left: 0; }
}

/* short column heads below 390 so the ledger fits 320 */
.rt-th-s { display: none; text-decoration: none; }
@media (max-width: 389px) {
  .rt-th { display: none; }
  .rt-th-s { display: inline; }
  .rt-tbl .tag { border: 0; padding: 0; }
  .rt-tbl th, .rt-tbl td, .rt-tbl td.cav { padding-inline: 5px; }
}
