/* Demand Panel — estilos del grupo "Help" (Help Center · Terms & Conditions · Report an Issue).
   Sólo variables de app.css (claro y oscuro salen solos) y propiedades lógicas (árabe = derecha a izquierda). */

/* ── Help Center ── */
.h-hero { text-align: center; padding: 20px 24px; background: linear-gradient(160deg, var(--accent-soft), var(--surface) 60%); }
.h-hero h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.h-hero p { margin-top: 4px; }
.h-search { max-width: 620px; margin: 18px auto 0; }
.h-sec { font-size: 15px; font-weight: 650; margin: 4px 0 12px; }
.h-topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.h-topic { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); min-height: 74px; }
.h-topic:hover { border-color: var(--accent); }
.h-topic-i { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; flex-shrink: 0; }
.h-topic-i.lg { width: 52px; height: 52px; border-radius: 14px; }
.h-topic-i.lg .ic { width: 24px; height: 24px; }
.h-topic-t { display: flex; flex-direction: column; min-width: 0; }
.h-topic-t b { font-size: 14px; }
.h-topic-t small { font-size: 12.5px; line-height: 1.35; }

.h-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; margin-top: 18px; }
.h-sec2 { margin-top: 22px; }
.h-grid-pop { margin-top: 0; }
.h-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: calc(var(--top) + 16px); }
.h-side-card p { margin-bottom: 14px; }
.h-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.h-list li + li { border-top: 1px solid var(--border); }
.h-art { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 18px; align-items: center; gap: 12px; padding: 10px 16px; } /* el tema va a la derecha, en la misma línea */
.h-art:hover { background: var(--surface-2); }
.h-art-i { width: 32px; height: 32px; border-radius: 9px; background: var(--surface-2); color: var(--accent-ink); display: grid; place-items: center; }
.h-art-t { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.h-art-t b { font-size: 14px; font-weight: 600; }
.h-art-t small { font-size: 12.5px; line-height: 1.4; }
.h-art-t .tag { margin-top: 4px; }
.h-chev { width: 16px; height: 16px; }
[dir="rtl"] .h-chev, [dir="rtl"] .crumbs .ic { transform: scaleX(-1); }
.h-count { margin-bottom: 10px; }
.h-list mark { background: var(--accent-soft); color: var(--accent-ink); border-radius: 3px; box-shadow: 0 0 0 2px var(--accent-soft); }

.h-crumbs { min-height: 24px; }
.h-crumbs a { color: var(--text-2); font-weight: 500; }
.h-thead { display: flex; align-items: center; gap: 16px; }
.h-thead h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.h-thead p { margin-top: 2px; }
.h-alltopics { display: flex; flex-direction: column; gap: 2px; padding: 14px; }
.h-alltopics .eyebrow { margin: 0 0 6px; margin-inline-start: 8px; }
.h-alltopics a { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; font-size: 13px; color: var(--text-2); }
.h-alltopics a:hover { background: var(--surface-2); }
.h-alltopics a.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

/* Artículo */
.h-article { padding: 28px 32px; }
.h-article header .tag { gap: 6px; }
.h-article h2 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 12px; line-height: 1.25; }
.h-lead { font-size: 15.5px; color: var(--text-2); margin-top: 8px; line-height: 1.55; }
.h-meta { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.h-body { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 15px; line-height: 1.7; color: var(--text-2); }
.h-body > * + * { margin-top: 12px; }
.h-body h3 { font-size: 16.5px; font-weight: 650; color: var(--text); margin-top: 22px; }
.h-body ul, .h-body ol { padding-inline-start: 22px; display: flex; flex-direction: column; gap: 6px; }
.h-body ul { list-style: disc; }
.h-body ol { list-style: decimal; }
.h-body li::marker { color: var(--accent); font-weight: 700; }
.h-call { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border-inline-start: 3px solid var(--accent); background: var(--accent-soft); }
.h-call > .ic { margin-top: 3px; color: var(--accent-ink); }
.h-call b { display: block; font-size: 13px; color: var(--text); }
.h-call p { font-size: 14px; line-height: 1.6; color: var(--text-2); }
.h-call.warn { border-inline-start-color: var(--red); background: var(--red-soft); }
.h-call.warn > .ic { color: var(--red); }
.h-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border); }
.h-util { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.h-util-q { font-size: 13.5px; font-weight: 600; }
.h-util-b { display: flex; gap: 8px; }
.h-util-ok { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--green); font-weight: 600; }
.h-rep { font-size: 13px; text-align: start; }
.h-rel li + li { border-top: 1px solid var(--border); }
.h-rel a { display: flex; align-items: flex-start; gap: 8px; padding: 9px 0; font-size: 13.5px; color: var(--text-2); line-height: 1.4; }
.h-rel a .ic { margin-top: 2px; color: var(--muted); }
.h-rel a:hover { color: var(--accent-ink); }
.h-glance { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.h-glance li { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.45; color: var(--text-2); }
.h-glance li .ic { color: var(--accent); margin-top: calc((1.45em - 14px) / 2); }

/* ── Terms & Conditions ── */
.r-tgrid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
.r-tside { position: sticky; top: calc(var(--top) + 16px); }
.r-toc { display: flex; flex-direction: column; gap: 2px; }
.r-toc .eyebrow { margin-inline-start: 10px; margin-bottom: 6px; }
.r-toc a { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; line-height: 1.35; }
.r-toc a:hover { background: var(--surface-2); color: var(--text); }
.r-toc a.r-toc-st { color: var(--amber); font-weight: 600; margin-top: 6px; }
.r-doc { padding: 28px 32px; max-width: 860px; }
.r-doc-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.r-doc-h h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.r-signed { display: flex; align-items: flex-start; gap: 8px; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); font-size: 13px; color: var(--text-2); margin-bottom: 8px; line-height: 1.45; }
.r-signed .ic { margin-top: calc((1.45em - 14px) / 2); }
.r-signed.ok { background: var(--green-soft); color: var(--green); }
.r-sec { padding-top: 22px; scroll-margin-top: calc(var(--top) + 16px); }
.r-sec h3 { font-size: 16px; font-weight: 650; margin-bottom: 8px; }
.r-sec p { color: var(--text-2); font-size: 14.5px; line-height: 1.7; }
.r-sec p + p { margin-top: 8px; }
.r-sec.clave h3 { color: var(--accent-ink); }
#t-st-sum { scroll-margin-top: calc(var(--top) + 16px); }
.r-strikes { margin-top: 18px; border: 1px solid var(--border); border-inline-start: 3px solid var(--amber); border-radius: 12px; background: var(--amber-soft); overflow: hidden; }
.r-st-h { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; }
.r-st-h > .ic { color: var(--amber); margin-top: 2px; }
.r-st-h > div { display: flex; flex-direction: column; } .r-st-h b { font-size: 14px; } .r-st-h small { font-size: 12.5px; }
.r-st-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--surface); }
.r-st-tbl th { text-align: start; font-size: 12px; font-weight: 600; color: var(--muted); padding: 9px 16px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.r-st-tbl td { padding: 10px 16px; border-top: 1px solid var(--border); vertical-align: middle; color: var(--text-2); text-align: start; }
.r-st-tbl tbody tr:first-child td { border-top: 0; }
.r-st-tbl .tag { white-space: normal; height: auto; min-height: 22px; padding: 3px 8px; line-height: 1.3; }
.r-dur { white-space: nowrap; font-weight: 600; color: var(--text); }

/* ── Report an Issue ── */
.rp-grid { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 18px; align-items: start; }
.rp-form-card { position: sticky; top: calc(var(--top) + 16px); }
.rp-form { display: flex; flex-direction: column; gap: 16px; }
.rp-tipos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rp-tipos .radio { gap: 10px; min-height: 46px; padding: 10px 12px; }
.rp-tl { font-weight: 600; font-size: 13.5px; }
.rp-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rp-drop { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px dashed var(--border-2); border-radius: 12px; cursor: pointer; background: var(--surface-2); }
.rp-drop:hover, .rp-drop:focus-within { border-color: var(--accent); }
.rp-drop > .ic { color: var(--accent); width: 22px; height: 22px; }
.rp-drop span { display: flex; flex-direction: column; } .rp-drop b { font-size: 13.5px; } .rp-drop small { font-size: 12px; }
.rp-shot { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--border); border-radius: 12px; }
.rp-shot img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.rp-shot div { display: flex; flex-direction: column; min-width: 0; }
.rp-shot b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-shot small { font-size: 12px; }
.rp-filtro { margin-bottom: 12px; }
.rp-list { display: flex; flex-direction: column; gap: 12px; }
.rp-item { padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; gap: 8px; }
.rp-h { display: flex; align-items: center; gap: 8px; }
.rp-sep { flex: 1; }
.rp-type { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.rp-t { font-size: 14.5px; line-height: 1.4; }
.rp-d { font-size: 13.5px; color: var(--text-2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rp-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rp-shot-l { font-size: 12.5px; }
.rp-reply { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); border-inline-start: 3px solid var(--accent); }
.rp-av { width: 26px; height: 26px; border-radius: 50%; background: var(--surface); color: var(--accent-ink); display: grid; place-items: center; flex-shrink: 0; }
.rp-reply b { font-size: 12.5px; display: block; }
.rp-reply p { font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
.rp-vote { display: flex; align-items: center; gap: 10px; }

@media (max-width: 1180px) and (min-width: 900px) {
  .h-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-grid { grid-template-columns: minmax(0, 1fr) 280px; }
  .r-tgrid { grid-template-columns: 200px minmax(0, 1fr); }
  .rp-grid { grid-template-columns: minmax(0, 1fr); }
  .rp-form-card { position: static; }
}
@media (max-width: 899px) {
  .h-hero { padding: 16px; }
  .h-art-tag { display: none; }
  .h-hero h2 { font-size: 22px; }
  .h-search input { font-size: 16px; }
  .h-topics { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .h-topic { min-height: 64px; padding: 12px 14px; }
  .h-grid, .r-tgrid, .rp-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .h-grid { margin-top: 14px; }
  .h-side, .r-tside, .rp-form-card { position: static; }
  .h-side { gap: 14px; }
  .r-tside { display: none; }
  .h-article, .r-doc { padding: 20px 16px; }
  .h-article h2 { font-size: 21px; }
  .h-body { font-size: 14.5px; }
  .h-thead h2 { font-size: 19px; }
  .r-doc-h h2 { font-size: 19px; }
  .r-st-tbl thead { display: none; }
  .r-st-tbl, .r-st-tbl tbody, .r-st-tbl tr, .r-st-tbl td { display: block; width: 100%; }
  .r-st-tbl tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px 16px; border-top: 1px solid var(--border); }
  .r-st-tbl tbody tr:first-child { border-top: 0; }
  .r-st-tbl td { padding: 0; border: 0; }
  .r-st-tbl td:first-child { grid-column: 1 / -1; color: var(--text); font-weight: 500; }
  .r-st-tbl td.r-dur { width: auto; text-align: end; }
}
/* Tablet en vertical (600–899): los temas de a dos, como en la tablet apaisada; uno por renglón quedaba muy estirado. */
@media (min-width: 600px) and (max-width: 899px) {
  .h-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Imprimir los términos: sólo el documento. */
@media print {
  body[data-route="rules-terms"] .side, body[data-route="rules-terms"] .top, body[data-route="rules-terms"] .bnav,
  body[data-route="rules-terms"] .r-tside, body[data-route="rules-terms"] .r-print,
  body[data-route="rules-terms"] .ph, body[data-route="rules-terms"] #toasts { display: none !important; }
  body[data-route="rules-terms"] .app, body[data-route="rules-terms"] .main { display: block; }
  body[data-route="rules-terms"] .page { padding: 0; max-width: none; }
  body[data-route="rules-terms"] .r-tgrid { display: block; }
  body[data-route="rules-terms"] .r-doc { border: 0; box-shadow: none; padding: 0; max-width: none; }
  .r-sec, .r-strikes { break-inside: avoid; }
}
