/* The guía didáctica table (shared/guide-table.js), for guia-didactica.html
   and the teacher panel: a calm, flat reference table in the site's blues.
   The component carries its own colours so it looks the same in both. */
.gt {
  --gt-ink: #2a3540;
  --gt-muted: #5d707a;
  --gt-line: #d8e8ec;
  --gt-soft: #f5fafb;
  --gt-primary: #1f8a9c;
  --gt-primary-hover: #17707f;
  --gt-primary-dark: #15495a;
  --gt-primary-soft: #e2f2f5;
  font-family: var(--am-readable-font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  font-size: 15px;
  line-height: 1.45;
  color: var(--gt-ink);
  text-align: left;
}
.gt :focus-visible { outline: 3px solid var(--gt-primary); outline-offset: 2px; }

/* filters */
.gt-filters { display: grid; gap: 10px; margin: 0 0 14px; }
.gt-f { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.gt-fl { width: 52px; font-size: 13px; font-weight: 700; color: var(--gt-muted); }
.gt-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 12px; border: 1px solid var(--gt-line); border-radius: 999px; background: #fff; color: var(--gt-ink); font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer; }
.gt-chip:hover { border-color: var(--gt-primary); }
.gt-chip[aria-pressed="true"] { background: var(--gt-primary-dark); border-color: var(--gt-primary-dark); color: #fff; }
.gt-chip i, .gt-topic i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; color: #fff; font: 700 10px/1 system-ui, sans-serif; font-style: normal; flex: none; }
.gt-f-end { justify-content: space-between; padding-left: 58px; }
.gt-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.gt-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--gt-primary); }
.gt-count { font-size: 13px; color: var(--gt-muted); font-variant-numeric: tabular-nums; }
.gt-empty { padding: 24px; text-align: center; color: var(--gt-muted); border: 1px dashed var(--gt-line); border-radius: 12px; }

/* table */
.gt-wrap { border: 1px solid var(--gt-line); border-radius: 12px; overflow: hidden; background: #fff; }
.gt-table { width: 100%; border-collapse: collapse; }
.gt-table thead th { padding: 10px 14px; background: var(--gt-soft); border-bottom: 1px solid var(--gt-line); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--gt-muted); text-align: left; white-space: nowrap; }
.gt-table td { padding: 10px 14px; border-bottom: 1px solid var(--gt-line); vertical-align: middle; }
.gt-table tbody:last-child tr:last-child td { border-bottom: 0; }
.gt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.gt-game th { padding: 14px 14px 10px; background: var(--gt-soft); border-bottom: 1px solid var(--gt-line); text-align: left; font-weight: 400; }
.gt-game-in { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.gt-game b { font-size: 17px; color: var(--gt-primary-dark); }
.gt-game p { margin: 2px 0 0; max-width: 75ch; font-size: 14px; color: var(--gt-muted); }
.gt-open { flex: none; font-size: 14px; font-weight: 600; color: var(--gt-primary); text-decoration: none; white-space: nowrap; }
.gt-open:hover { text-decoration: underline; }

.gt-lvl { min-width: 210px; }
.gt-lvl > span:last-child { display: inline-flex; flex-direction: column; gap: 3px; vertical-align: middle; }
.gt-lvl b { font-size: 15px; }
.gt-ic { display: inline-block; vertical-align: middle; margin-right: 10px; }
.gt-ic .op-mini, .gt-ic .gt-pdf-ic { display: block; width: 40px; height: 40px; }
.gt-paper .gt-ic { color: var(--gt-muted); }
.gt-topic { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--gt-muted); }
.gt-what { color: var(--gt-ink); max-width: 46ch; }
.gt-age { white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.gt-yr { display: none; font-weight: 400; }
.gt-age span[title] { cursor: help; color: var(--gt-muted); }
.gt-mat { white-space: nowrap; }
.gt-pdf { display: inline-flex; align-items: center; gap: 6px; color: var(--gt-primary-dark); font-size: 13px; font-weight: 600; text-decoration: none; }
.gt-pdf .gt-pdf-ic { width: 26px; height: 26px; color: var(--gt-primary-dark); }
.gt-pdf:hover span { text-decoration: underline; }
.gt-sol { display: block; margin: 2px 0 0 32px; font-size: 12px; color: var(--gt-muted); }
.gt-none { color: var(--gt-line); }
.gt-go { text-align: right; }
.gt-play { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 8px; background: var(--gt-primary); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.gt-play:hover { background: var(--gt-primary-hover); }
.gt-legend { margin: 8px 2px 0; font-size: 13px; color: var(--gt-muted); }

/* phones: each row becomes a small card */
@media (max-width: 720px) {
  .gt-fl { width: 100%; }
  .gt-f-end { padding-left: 0; }
  .gt-table thead { display: none; }
  .gt-table, .gt-table tbody, .gt-table tr, .gt-table td, .gt-table th { display: block; }
  .gt-game-in { flex-direction: column; gap: 6px; }
  .gt-table tr:not(.gt-game) { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 14px; border-bottom: 1px solid var(--gt-line); }
  .gt-table tr:not(.gt-game) td { padding: 0; border: 0; }
  .gt-lvl { grid-column: 1 / -1; min-width: 0; }
  .gt-what { grid-column: 1 / -1; max-width: none; }
  .gt-age { grid-column: 1 / -1; font-weight: 400; color: var(--gt-muted); }
  .gt-yr { display: inline; }
  .gt-go { align-self: center; }
  .gt-mat:has(.gt-none) { visibility: hidden; }
}

/* guia-didactica.html: the table on a white sheet between the site's
   header and footer. */
.menu-screen.article-top { min-height: 0; }
.guide-sheet { position: relative; z-index: 1; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }
.guide-sheet-in { max-width: 1120px; margin: 0 auto; padding: clamp(18px, 3vw, 32px); background: #fff; border-radius: 18px; box-shadow: 0 2px 0 rgba(21, 73, 90, .12), 0 10px 30px rgba(21, 73, 90, .10); font-family: var(--am-readable-font); color: #2a3540; text-align: left; }
.guide-sheet h2 { margin: 0 0 6px; font: 700 clamp(20px, 3vw, 26px) var(--am-readable-font); color: #15495a; }
.guide-lead { margin: 0 0 20px; max-width: 70ch; color: #5d707a; }
.guide-note { margin: 10px 2px 0; font-size: 13px; color: #5d707a; }
.guide-tips { margin-top: 26px; padding: 18px 20px; background: #f5fafb; border: 1px solid #d8e8ec; border-radius: 12px; }
.guide-tips h3 { margin: 0 0 8px; font: 700 17px var(--am-readable-font); color: #15495a; }
.guide-tips ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
#materiales { display: block; scroll-margin-top: 20px; }
