/* ==========================================================
   IHSAPS assignment tables
   Only affects content wrapped in <div class="ihsaps-wrap">,
   so every other page on the site is left alone.
   ========================================================== */
.ihsaps-wrap{container-type:inline-size;}
.ihsaps-wrap .ihsaps-updated{font-size:.95em;color:#555;margin:0 0 .8em;}

/* "Jump to" links */
.ihsaps-wrap .ihsaps-jump{display:flex;flex-wrap:wrap;gap:.4em .45em;list-style:none;margin:0 0 1.1em;padding:0;font-size:.9em;}
.ihsaps-wrap .ihsaps-jump li{margin:0;}
.ihsaps-wrap .ihsaps-jump a{display:inline-block;padding:.22em .7em;border:1px solid #d7c3c7;border-radius:999px;background:#fff;color:#912b3b;text-decoration:none;line-height:1.35;}
.ihsaps-wrap .ihsaps-jump a:hover,.ihsaps-wrap .ihsaps-jump a:focus{background:#912b3b;border-color:#912b3b;color:#fff;}

/* Table */
.ihsaps-wrap table.ihsaps-table{width:100% !important;max-width:100%;height:auto !important;border-collapse:collapse;border:1px solid #c9c9c9;font-size:.95em;line-height:1.5;margin:0 0 1.2em;}
.ihsaps-wrap .ihsaps-table td,.ihsaps-wrap .ihsaps-table th{border:1px solid #c9c9c9;padding:.55em .75em;vertical-align:top;width:auto !important;height:auto !important;}
.ihsaps-wrap .ihsaps-table:not(.multi) td:first-child{width:36% !important;}
.ihsaps-wrap .ihsaps-table tr.row-head td{background:#912b3b;color:#fff;font-weight:700;letter-spacing:.01em;}
.ihsaps-wrap .ihsaps-table tr.row-head td *{color:#fff !important;}
.ihsaps-wrap .ihsaps-table tr:not(.row-head):not([style*="background"]):nth-child(even) td{background:#f6f4f4;}
.ihsaps-wrap .ihsaps-table .open{color:inherit;opacity:.6;font-style:italic;}
.ihsaps-wrap .ihsaps-table tr[id]{scroll-margin-top:1rem;}

/* Computers and tablets: sites as a grid of cards.
   State Finals and each sectional span the full width, with its regionals as cards below. */
@container (min-width: 601px){
  .ihsaps-wrap table.ihsaps-table:not(.multi){border:0;}
  .ihsaps-wrap .ihsaps-table:not(.multi) tbody{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75em;}
  .ihsaps-wrap .ihsaps-table:not(.multi) tr{display:block;border:1px solid #c9c9c9;border-radius:8px;overflow:hidden;background:#fff;}
  .ihsaps-wrap .ihsaps-table:not(.multi) td{display:block;border:0;width:auto !important;padding:.45em .8em;}
  .ihsaps-wrap .ihsaps-table:not(.multi) td:first-child{width:auto !important;font-weight:700;padding:.65em .8em .15em;}
  .ihsaps-wrap .ihsaps-table:not(.multi) td:last-child{padding-bottom:.7em;}
  .ihsaps-wrap .ihsaps-table:not(.multi) tr.col-labels{display:none;}
  .ihsaps-wrap .ihsaps-table:not(.multi) tr.row-head{border-color:#912b3b;}
  .ihsaps-wrap .ihsaps-table:not(.multi) tr.row-head td{padding:.5em .8em;}
  .ihsaps-wrap .ihsaps-table:not(.multi) tr.row-head td:not(:first-child){display:none;}
  .ihsaps-wrap .ihsaps-table:not(.multi) tr.row-head,.ihsaps-wrap .ihsaps-table:not(.multi) tr[id][style*="background"]{grid-column:1/-1;}
  .ihsaps-wrap .ihsaps-table:not(.multi) tr.row-head:not(:first-child),.ihsaps-wrap .ihsaps-table:not(.multi) tr[id][style*="background"]:not(:first-child){margin-top:.9em;}
  .ihsaps-wrap .ihsaps-table:not(.multi) tr:not(.row-head):not([style*="background"]):nth-child(even) td{background:transparent;}
}
@container (min-width: 1000px){
  .ihsaps-wrap .ihsaps-table:not(.multi) tbody{grid-template-columns:repeat(4,minmax(0,1fr));}
}

/* Phones and narrow columns: each row becomes a stacked card */
@container (max-width: 600px){
  .ihsaps-wrap table.ihsaps-table,.ihsaps-wrap .ihsaps-table tbody,.ihsaps-wrap .ihsaps-table tr,.ihsaps-wrap .ihsaps-table td{display:block;width:100% !important;}
  .ihsaps-wrap table.ihsaps-table{border:0;}
  .ihsaps-wrap .ihsaps-table tr{border:1px solid #c9c9c9;border-radius:6px;overflow:hidden;margin:0 0 .6em;}
  .ihsaps-wrap .ihsaps-table td{border:0;}
  .ihsaps-wrap .ihsaps-table:not(.multi) td:first-child{width:100% !important;font-weight:700;padding-bottom:.1em;}
  .ihsaps-wrap .ihsaps-table tr.row-head{border-color:#912b3b;margin-top:1em;}
  .ihsaps-wrap .ihsaps-table tr.row-head td:not(:first-child){display:none;}
  .ihsaps-wrap .ihsaps-table tr.col-labels{display:none;}
  .ihsaps-wrap .ihsaps-table.multi td[data-label]::before{content:attr(data-label) ": ";font-weight:600;color:#666;}
  .ihsaps-wrap .ihsaps-table.multi tr:not(.row-head) td{padding:.12em .75em;}
  .ihsaps-wrap .ihsaps-table.multi tr:not(.row-head) td:first-child{padding-top:.55em;}
  .ihsaps-wrap .ihsaps-table.multi tr:not(.row-head) td:last-child{padding-bottom:.55em;}
  .ihsaps-wrap .ihsaps-table tr:not(.row-head):not([style*="background"]):nth-child(even) td{background:transparent;}
}
/* ==========================================================
   Header logo (IHSAPS whistle). The image is drawn at 3x so it
   stays sharp on phones and high-resolution screens.
   ========================================================== */
.brand-logo img{height:70px;width:auto;max-width:100%;}
@media (max-width: 575px){ .brand-logo img{height:56px;} }
