/* ==========================================================================
   KNEST ATI + Publications — CAK-style grouped tables, brand-themed, responsive.
   ========================================================================== */

.ati-intro { max-width: 860px; margin-bottom: var(--sp-6); line-height: 1.65; }

.ati-heading {
  font-size: var(--fs-600, 1.5rem); font-weight: 700; color: var(--brand);
  margin: var(--sp-7) 0 var(--sp-4);
}

/* Table shell */
.ati-table-wrap {
  width: 100%; overflow-x: auto;
  border: 1px solid var(--border); border-radius: var(--r-lg);
  -webkit-overflow-scrolling: touch;
}
.ati-table-wrap:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.ati-table { width: 100%; border-collapse: collapse; font-size: var(--fs-400); }
.ati-table thead th {
  background: var(--brand); color: #fff; font-weight: 700; text-align: left;
  padding: var(--sp-3) var(--sp-4); font-size: var(--fs-300); white-space: nowrap;
}
.ati-table tbody td,
.ati-table tbody th {
  padding: var(--sp-4); border-top: 1px solid var(--border);
  vertical-align: top; line-height: 1.55; text-align: left;
}

/* Grouped Title | Document table */
.ati-col-title { width: 28%; }
.ati-group-title {
  font-weight: 700; color: var(--brand);
  background: var(--surface, #f8f9f5);
  font-size: var(--fs-450, 1.02rem);
}
.ati-doclist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ati-link {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-2);
  text-decoration: none; color: var(--ink);
  border-radius: var(--r-sm, 6px);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.ati-link:hover { background: var(--green-050); color: var(--brand); }
.ati-icon { color: var(--brand-accent, #f47d20); flex-shrink: 0; }
.ati-label { font-weight: 600; }
.ati-size { color: var(--text-muted); font-size: var(--fs-300); white-space: nowrap; }

/* Powers & Duties table */
.ati-table:not(.ati-table--grouped) td[data-label="No."] { width: 56px; font-weight: 700; color: var(--brand); }
.ati-table:not(.ati-table--grouped) td[data-label="Designation"] { white-space: nowrap; font-weight: 600; }
.ati-table:not(.ati-table--grouped) tbody tr:nth-child(even) { background: var(--surface, #f8f9f5); }

/* Mobile: stack to cards */
@media (max-width: 720px) {
  .ati-table-wrap { border: none; overflow: visible; }
  .ati-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ati-table, .ati-table tbody, .ati-table tr, .ati-table td, .ati-table th { display: block; width: 100%; }
  .ati-table tr {
    border: 1px solid var(--border); border-radius: var(--r-md);
    margin-bottom: var(--sp-4); padding: var(--sp-2); background: #fff;
  }
  .ati-table tbody td, .ati-table tbody th { border: none; padding: var(--sp-2) var(--sp-3); }
  .ati-group-title { background: transparent; font-size: var(--fs-500, 1.1rem); padding-bottom: 0; }
  .ati-table:not(.ati-table--grouped) td[data-label]::before {
    content: attr(data-label); display: block; font-weight: 700;
    color: var(--brand); font-size: var(--fs-300); margin-bottom: 2px;
  }
  .ati-table:not(.ati-table--grouped) td[data-label="No."] { width: auto; }
  .ati-table:not(.ati-table--grouped) tbody tr:nth-child(even) { background: #fff; }
  .ati-col-title { width: auto; }
}
