/* /programa-oficial — archive of programmes; builds on corridas.css + components. */

/* last programme */
.po-last__main { grid-column: 1 / 8; padding: 28px 32px; display: flex; flex-direction: column; gap: 18px; }
.po-last__docs { grid-column: 8 / 13; padding: 26px 28px 20px; }
.po-last__docs .docs { margin-top: 12px; }
.po-last__docs .docs li { grid-template-columns: auto minmax(0, 1fr); }
.po-last__docs .docs li .docs__act { grid-column: 2; }
.po-last__top { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.po-last__top .oct { --s: 76px; font-size: 27px; }
.po-last__top .tile__h { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem); }
.po-last__main .times { margin: 0; }
.po-mini td.horse a { text-decoration: none; }
.po-mini td.horse a:hover { text-decoration: underline; }
.po-mini .num .oct { background: var(--color-brand); }
.po-last__cta { margin-top: auto; }
.docs li.is-off { color: var(--color-muted); }
.docs li.is-off > .ico { color: var(--color-border); }
.phero .status { margin: 0 0 12px; }
.sec__aside .status { margin: 10px 0 0; }

/* archive table */
.po-arch { background: var(--color-surface); border: 1px solid var(--color-border); border-top: 2px solid var(--color-text); padding: 4px 20px 8px; }
.po-table { table-layout: fixed; }
.po-table th[scope="col"] { padding-top: 14px; white-space: normal; }
.po-table th[scope="col"]:first-child { width: 24%; }
.po-table td { vertical-align: middle; }
.po-table__m { width: 24%; text-align: left; font-weight: 400; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--color-border) !important; }
.po-table__m a { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--color-text); min-height: 44px; }
.po-table__m .oct { --s: 40px; font-size: 14px; }
.po-table__m .oct--blank { color: var(--color-text); }
.po-table__m a > span:not(.oct) { display: flex; flex-direction: column; line-height: 1.25; }
.po-table__m b { font-weight: 600; font-size: 16px; }
.po-table__m small { font-size: 13px; color: var(--color-muted); }
.po-table__m a:hover b { color: var(--color-brand); text-decoration: underline; text-underline-offset: 3px; }
.po-table tbody tr { transition: background-color var(--dur-fast); }
.po-table tbody tr:hover { background: var(--color-surface-2); }
.po-table td .docs__act { display: inline-flex; flex-wrap: nowrap; }
.po-rn { display: inline-block; font-size: 13px; font-weight: 600; margin-right: 8px; }

/* detail without transcription */
.po-pdf { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px 24px; align-items: center; padding: 28px 32px; }
.po-pdf > .oct { --s: 64px; }
.po-pdf__t { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -.03em; margin: 4px 0 6px; }
.po-pdf__act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; max-width: 380px; }
.po-pdf__act .extnote { flex-basis: 100%; justify-content: flex-end; }
.po-races { margin-top: 24px; }
.po-side { display: flex; flex-direction: column; }

/* guide */
.po-guide__main { grid-column: 1 / -1; padding: 28px 32px; }
.po-guide__main .tile__h { margin-bottom: 18px; }
.po-guide__photo { grid-column: 1 / -1; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.po-guide__photo picture { grid-column: 1 / -1; display: block; }
.po-guide__photo img { width: 100%; height: 300px; object-fit: cover; object-position: 50% 62%; }
.po-guide__photo figcaption { padding: 12px 20px 14px; font-size: 14px; color: var(--color-muted); border-top: 1px solid var(--color-border); }
.po-gloss { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; margin: 22px 0 0; border-top: 1px solid var(--color-text); }
.po-gloss div { display: grid; grid-template-columns: 1fr; align-content: start; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
.po-gloss dt { font-family: var(--font-mono); font-weight: 600; font-size: 14px; }
.po-gloss dd { margin: 0; color: var(--color-muted); font-size: 15px; }

@media (max-width: 1279px) {
  .po-last__main, .po-last__docs { grid-column: 1 / -1; }
  .po-gloss { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  /* archive table → one card per meeting */
  .po-arch { padding: 0; border: 0; background: transparent; }
  .po-table, .po-table tbody, .po-table tr, .po-table th, .po-table td { display: block; width: 100%; }
  .po-table thead { display: none; }
  .po-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--color-surface); border: 1px solid var(--color-border); border-top: 2px solid var(--color-text); margin-bottom: 12px; }
  .po-table tbody tr:hover { background: var(--color-surface); }
  .po-table .po-table__m { grid-column: 1 / -1; padding: 12px 16px; }
  .po-table td { padding: 10px 16px !important; border-left: 0 !important; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
  .po-table td:nth-of-type(even) { border-left: 1px solid var(--color-border) !important; }
  .po-table td::before { content: attr(data-label); flex-basis: 100%; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; color: var(--color-muted); }
  .po-pdf { grid-template-columns: auto minmax(0, 1fr); }
  .po-pdf__act { grid-column: 1 / -1; justify-content: flex-start; max-width: none; }
  .po-pdf__act .extnote { justify-content: flex-start; }
}
@media (max-width: 899px) {
  .po-guide__photo img { height: 220px; }
  .po-gloss { grid-template-columns: 1fr; }
}
@media (max-width: 759px) {
  .po-last__main, .po-last__docs, .po-guide__main { padding: 22px 18px; }
  .po-last__top .oct { --s: 60px; font-size: 21px; }
  .po-mini th:nth-child(5), .po-mini td:nth-child(5) { display: none; }
  .po-mini td, .po-mini th { padding-right: 6px; }
  .po-mini th + th, .po-mini td + td { padding-left: 6px; }
  .po-mini .dist .post { display: none; }
  .po-table tbody tr { grid-template-columns: 1fr 1fr; }
  .po-pdf { padding: 22px 18px; }
  .po-pdf__act .btn { flex: 1 1 100%; }
  .po-gloss div { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 389px) {
  .po-table__m small { white-space: normal; overflow-wrap: anywhere; }
}
