/* GPA benchmark pages (gpa-benchmark-pages.php; /average-gpa/, /what-is-a-good-gpa/, /average-gpa-by-major/).
   Loaded only on pages with a [gpa_benchmark] shortcode. Tokens only. Charts are rows (name | track | value) on a white
   panel, like a table; the answer box and the tools are tinted cards whose figures sit on white blocks (D-79).
   The same row grid as the "Where a X GPA stands" box (components.css), so every GPA chart on the site reads alike. */

/* ---------- text width (D-80): every content asset sits in the text column with the paragraphs; only the answer card
   at the top spans the card. Tables and the Keep planning cards included. ---------- */
#page #main .entry-content :is(.gpa-bench-fig, .gpa-bench-rank, .gpa-search[data-gpa-find], figure.wp-block-table, .rx-rel):not(#gpa-x) {
    max-width: var(--gpa-text-max) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
@media (min-width: 641px) {
    #page #main .entry-content :is(.gpa-bench-fig, .gpa-bench-rank, .gpa-search[data-gpa-find], figure.wp-block-table, .rx-rel):not(#gpa-x) { max-width: min(var(--gpa-text-max), calc(100% - 80px)) !important; }
}
@media (min-width: 641px) and (max-width: 880px) {
    #page #main .entry-content :is(.gpa-bench-fig, .gpa-bench-rank, .gpa-search[data-gpa-find], figure.wp-block-table, .rx-rel):not(#gpa-x) { max-width: 100% !important; }
}

/* ---------- answer box: the guide answer card (.rx-formula), with the key figures under a divider ---------- */
#page #main .entry-content .gpa-bench-facts > p.rx-sub:not(#root *) { text-align: left !important; }
#page #main .entry-content .gpa-bench-facts > p.gpa-guide-cta:not(#gpa-x) { margin-top: 20px !important; }
#page #main .entry-content .gpa-bench-facts__grid:not(#gpa-x) {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 20px;
    max-width: none !important;
    margin: 20px 0 0 !important;
    padding: 20px 0 0 !important;
    border-top: 1px solid var(--gpa-border);
}
#page #main .entry-content .gpa-bench-facts__grid dt {
    min-height: 2.8em; /* two lines, so every figure sits on one line across the row */
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--gpa-accent);
}
#page #main .entry-content .gpa-bench-facts__grid dd {
    margin: 6px 0 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--gpa-heading);
}
#page #main .entry-content .gpa-bench-facts__grid dd.gpa-bench-facts__note {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
    color: var(--gpa-text-secondary);
}

#page #main .entry-content .gpa-bench-rank__out:not(#gpa-x) {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: none !important;
    margin: 18px 0 0 !important;
    padding: 0 !important;
}
#page #main .entry-content .gpa-bench-rank__out > div {
    padding: 14px 16px;
    border: 1px solid var(--gpa-border);
    border-radius: var(--gpa-radius-md);
    background: var(--gpa-surface);
}
#page #main .entry-content .gpa-bench-rank__out dt {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--gpa-text-secondary);
}
#page #main .entry-content .gpa-bench-rank__out dd {
    margin: 4px 0 0;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--gpa-heading);
}
#page #main .entry-content .gpa-bench-rank__out dd.gpa-bench-facts__note {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--gpa-text-secondary);
}

/* ---------- charts ---------- */
#page #main .entry-content .gpa-bench-fig:not(#gpa-x) {
    --bench-name: 210px;
    --bench-val: 48px;
    --bench-gap: 12px;
    --bench-pad: 20px;
    box-sizing: border-box;
    margin-top: 24px !important;
    margin-bottom: 24px !important;
    padding: var(--bench-pad) var(--bench-pad) 14px;
    border: 1px solid var(--gpa-border);
    border-radius: var(--gpa-radius-md);
    background: var(--gpa-surface);
}
#page #main .entry-content .gpa-bench-fig--wide:not(#gpa-x) { --bench-name: 260px; }
.gpa-bench-chart { position: relative; }
#page #main .entry-content .gpa-bench-rows:not(#gpa-x) {
    list-style: none;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
#page #main .entry-content .gpa-bench-row:not(#gpa-x),
#page #main .entry-content .gpa-bench-axis,
#page #main .entry-content .gpa-bench-reflab {
    display: grid;
    grid-template-columns: var(--bench-name) 1fr var(--bench-val);
    column-gap: var(--bench-gap);
    align-items: center;
}
#page #main .entry-content .gpa-bench-row:not(#gpa-x) {
    min-height: 34px;
    margin: 0 !important;
    padding: 2px 0 !important;
    font-size: var(--gpa-small-size) !important;
    line-height: 1.3 !important;
    color: var(--gpa-text);
}
#page #main .entry-content .gpa-bench-row:not(#gpa-x)::before { content: none !important; display: none !important; }
#page #main .entry-content .gpa-bench-row:not(#gpa-x)::marker { content: none; }
#page #main .entry-content .gpa-bench-row.is-strong:not(#gpa-x) { font-weight: 600; color: var(--gpa-text-strong); }
.gpa-bench-name { text-align: right; }
.gpa-bench-name small { display: block; font-size: 12px; font-weight: 400; color: var(--gpa-text-muted); }
.gpa-bench-name sup { font-size: 11px; margin-left: 1px; }
.gpa-bench-track {
    position: relative;
    height: 30px;
    background: linear-gradient(var(--gpa-border), var(--gpa-border)) center / 100% 2px no-repeat;
}
.gpa-bench-val { font-weight: 600; color: var(--gpa-heading); white-space: nowrap; }
.gpa-bench-dot {
    position: absolute;
    top: 50%;
    left: calc(var(--x) * 100%);
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border: 2px solid var(--gpa-primary);
    border-radius: 50%;
    background: var(--gpa-primary);
    box-sizing: border-box;
    box-shadow: 0 0 0 2px var(--gpa-surface);
    z-index: 3;
}
.gpa-bench-dot.is-muted { background: var(--gpa-blue-300); border-color: var(--gpa-blue-300); }
.gpa-bench-dot.is-hollow { background: var(--gpa-surface); border-color: var(--gpa-blue-500); }
.gpa-bench-dot.is-alt { background: var(--gpa-amber-600); border-color: var(--gpa-amber-600); }
.gpa-bench-bar {
    position: absolute;
    left: 0;
    top: 50%;
    width: calc(var(--w) * 100%);
    height: 14px;
    margin-top: -7px;
    border-radius: 0 4px 4px 0;
    background: var(--gpa-blue-300);
}
.gpa-bench-bar.is-strong { background: var(--gpa-primary); }
.gpa-bench-range, .gpa-bench-link {
    position: absolute;
    top: 50%;
    left: calc(var(--a) * 100%);
    width: calc((var(--b) - var(--a)) * 100%);
    text-decoration: none;
}
.gpa-bench-range { height: 12px; margin-top: -6px; border-radius: 6px; background: var(--gpa-blue-200); z-index: 1; }
.gpa-bench-link { height: 2px; margin-top: -1px; background: var(--gpa-blue-400); z-index: 1; }
/* reference line (the average) through every row */
.gpa-bench-chart.has-ref::after {
    content: "";
    position: absolute;
    top: 24px;
    bottom: 26px;
    left: calc(var(--bench-name) + var(--bench-gap) + (100% - var(--bench-name) - 2 * var(--bench-gap) - var(--bench-val)) * var(--ref));
    width: 0;
    border-left: 2px dashed var(--gpa-amber-600);
    margin-left: -1px;
    pointer-events: none;
    z-index: 2;
}
.gpa-bench-track { z-index: auto; }
.gpa-bench-reftrack { position: relative; height: 24px; }
.gpa-bench-reftrack b {
    position: absolute;
    top: 2px;
    left: clamp(40px, calc(var(--ref) * 100%), calc(100% - 40px));
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 700;
    color: var(--gpa-amber-700);
    white-space: nowrap;
}
.gpa-bench-ticks { position: relative; height: 26px; }
.gpa-bench-ticks span {
    position: absolute;
    top: 6px;
    left: calc(var(--x) * 100%);
    transform: translateX(-50%);
    font-size: 12px;
    color: var(--gpa-text-muted);
}
#page #main .entry-content .gpa-bench-legend:not(#gpa-x) {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    max-width: none !important;
    margin: 4px 0 0 !important;
    font-size: 13px !important;
    color: var(--gpa-text-secondary);
}
.gpa-bench-legend span::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    vertical-align: -1px;
    border-radius: 50%;
    border: 2px solid var(--gpa-primary);
    background: var(--gpa-primary);
}
.gpa-bench-legend .is-range::before { width: 18px; border-radius: 5px; border-color: var(--gpa-blue-200); background: var(--gpa-blue-200); }
.gpa-bench-legend .is-hollow::before { background: var(--gpa-surface); border-color: var(--gpa-blue-500); }
.gpa-bench-legend .is-muted::before { background: var(--gpa-blue-300); border-color: var(--gpa-blue-300); }
.gpa-bench-legend .is-alt::before { background: var(--gpa-amber-600); border-color: var(--gpa-amber-600); }
#page #main .entry-content .gpa-bench-table figcaption:not(#gpa-x) { padding: 0 16px 12px !important; }
#page #main .entry-content .gpa-bench-fig figcaption:not(#gpa-x) { padding: 0 !important; }
#page #main .entry-content .gpa-bench-fig figcaption:not(#gpa-x),
#page #main .entry-content .gpa-bench-table figcaption:not(#gpa-x) {
    margin: 10px 0 0 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    text-align: left !important;
    font-style: normal !important;
    color: var(--gpa-text-muted) !important;
}

/* ---------- tables ---------- */
.gpa-bench-ex { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--gpa-text-muted); }
#page #main .entry-content .gpa-bench-table tr.is-total :is(th, td):not(#gpa-x) { background: var(--gpa-table-total-bg); font-weight: 600; color: var(--gpa-heading); }
#page #main .entry-content .gpa-bench-table tr[hidden] { display: none; }
#page #main .entry-content .gpa-bench-table abbr { text-decoration: none; cursor: help; }
#page #main .entry-content .gpa-bench-table td { white-space: nowrap; }
#page #main .entry-content :is(.gpa-bench-table, .gpa-bench-goals) tbody th:not(#gpa-x),
#page #main .entry-content .gpa-bench-goals td:not(#gpa-x) { text-align: left !important; }
#page #main .entry-content .gpa-bench-goals td:not(#gpa-x) { white-space: normal; }
#page #main .entry-content .gpa-bench-table thead th:first-child:not(#gpa-x),
#page #main .entry-content .gpa-bench-goals thead th:not(:last-child):not(#gpa-x) { text-align: left !important; }
#page #main .entry-content :is(.gpa-bench-stack, .gpa-bench-goals) a { white-space: nowrap; }
/* the tool sits last in its section: the section gap below is enough */
#page #main .entry-content .rx-sec > :is(.gpa-stands--tool, .gpa-bench-rank):last-child { margin-bottom: 0 !important; }
.gpa-bench-sortbtn {
    all: unset;
    cursor: pointer;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: inherit;
    color: inherit;
}
.gpa-bench-sortbtn:focus-visible { outline: 2px solid var(--gpa-focus-ring); outline-offset: 2px; border-radius: 4px; }
th[aria-sort] .gpa-bench-sortbtn::after { content: "↓"; font-size: 12px; color: var(--gpa-accent); }
th[aria-sort="ascending"] .gpa-bench-sortbtn::after { content: "↑"; }

/* ---------- tools (inputs) ---------- */
#page #main .entry-content :is(.gpa-bench-rank__in, .gpa-stands__try) :is(input, select):not(#gpa-x) {
    box-sizing: border-box;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--gpa-calc-input-border);
    border-radius: var(--gpa-radius-sm, 8px);
    background: var(--gpa-surface);
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--gpa-text-strong);
}
#page #main .entry-content :is(.gpa-bench-rank__in, .gpa-stands__try) :is(input, select):focus-visible {
    outline: 2px solid var(--gpa-focus-ring);
    outline-offset: 1px;
}
#page #main .entry-content .gpa-bench-find label:not(#gpa-x),
#page #main .entry-content :is(.gpa-bench-rank__in, .gpa-stands__try) label:not(#gpa-x) {
    font-size: var(--gpa-small-size);
    font-weight: 600;
    color: var(--gpa-text-strong);
}
#page #main .entry-content .gpa-stands__try:not(#gpa-x) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    max-width: none !important;
    margin: 10px 0 4px !important;
}
#page #main .entry-content .gpa-stands__try input:not(#gpa-x) { width: 120px; }
.gpa-stands__err, .gpa-bench-rank__err { flex-basis: 100%; font-size: 13px; color: var(--gpa-danger); }

#page #main .entry-content .gpa-bench-rank:not(#gpa-x) {
    box-sizing: border-box;
    margin-top: 24px !important;
    margin-bottom: var(--gpa-block-gap) !important;
    padding: 24px;
    border: 1px solid var(--gpa-border);
    border-radius: var(--gpa-radius-lg);
    background: var(--gpa-tint-blue);
}
#page #main .entry-content .gpa-bench-rank__title:not(#gpa-x) {
    margin: 0 0 12px !important;
    font-size: var(--gpa-h3-size);
    line-height: var(--gpa-h3-line);
    color: var(--gpa-heading);
}
#page #main .entry-content .gpa-bench-rank__in:not(#gpa-x) {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 12px;
    max-width: none !important;
    margin: 0 !important;
}
#page #main .entry-content .gpa-bench-rank__in label:not(#gpa-x) { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#page #main .entry-content .gpa-bench-rank__in :is(input, select):not(#gpa-x) { width: 100%; max-width: 100%; }
#page #main .entry-content .gpa-bench-rank__out:not(#gpa-x) { grid-template-columns: repeat(3, 1fr); }
#page #main .entry-content .gpa-bench-rank :is(.gpa-bench-rank__note, .gpa-bench-rank__err):not(#gpa-x) {
    max-width: none !important;
    margin: 12px 0 0 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: var(--gpa-text-secondary);
}
#page #main .entry-content .gpa-bench-rank .gpa-bench-rank__err:not(#gpa-x) { color: var(--gpa-danger); }

/* ---------- phones ---------- */
@media (max-width: 760px) {
    #page #main .entry-content .gpa-bench-facts__grid:not(#gpa-x) { grid-template-columns: repeat(2, 1fr); }
    #page #main .entry-content .gpa-bench-rank__out:not(#gpa-x) { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    #page #main .entry-content .gpa-bench-ticks span:nth-child(even):not(:last-child) { display: none; } /* every other tick, always the end one */
    #page #main .entry-content .gpa-bench-ticks span:nth-last-child(2):nth-child(odd) { display: none; } /* no tick crowding the end one */
    /* tables become one card per row: the row name, then each figure on its own line with its column name */
    #page #main .entry-content .gpa-bench-stack:not(#gpa-x) { overflow: visible; }
    #page #main .entry-content .gpa-bench-stack :is(table, thead, tbody, tr, th, td):not(#gpa-x) { display: block; width: auto !important; }
    #page #main .entry-content .gpa-bench-stack thead:not(#gpa-x) { position: absolute; width: 1px !important; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    #page #main .entry-content .gpa-bench-stack tr:not(#gpa-x) { padding: 12px 16px; border-top: 1px solid var(--gpa-divider); }
    #page #main .entry-content .gpa-bench-stack tr:first-child:not(#gpa-x) { border-top: 0; }
    #page #main .entry-content .gpa-bench-stack tr[hidden] { display: none !important; }
    #page #main .entry-content .gpa-bench-stack :is(th, td):not(#gpa-x) { padding: 2px 0 !important; border: 0 !important; background: none !important; text-align: left !important; white-space: normal; }
    #page #main .entry-content .gpa-bench-stack th:not(#gpa-x) { padding-bottom: 4px !important; font-size: 16px; }
    #page #main .entry-content .gpa-bench-stack td[data-label]:not(#gpa-x) { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
    #page #main .entry-content .gpa-bench-stack td[data-label]::before { content: attr(data-label); flex: 0 0 55%; text-align: left; color: var(--gpa-text-secondary); font-weight: 400; }
    #page #main .entry-content .gpa-bench-lookup tbody th a::after { content: " GPA"; }
    #page #main .entry-content .gpa-bench-stack td[data-label]:not(#gpa-x) { text-align: right !important; }
    /* majors: the four figures run on in one or two lines under the field name */
    #page #main .entry-content .gpa-bench-compact td[data-label]:not(#gpa-x) { display: inline-flex; flex-direction: column; gap: 0; margin-right: 18px; text-align: left !important; }
    #page #main .entry-content .gpa-bench-compact td[data-label]::before { flex: none; font-size: 12px; }
    #page #main .entry-content .gpa-bench-stack tr.is-total:not(#gpa-x) { background: var(--gpa-table-total-bg); }
    #page #main .entry-content .gpa-bench-rank:not(#gpa-x) { padding: 16px; }
    #page #main .entry-content .gpa-bench-rank__out > div { padding: 12px; }
    #page #main .entry-content :is(.gpa-bench-facts__grid, .gpa-bench-rank__out) dd { font-size: 24px; }
    #page #main .entry-content :is(.gpa-bench-fig, .gpa-bench-fig--wide):not(#gpa-x) { --bench-name: 104px; --bench-val: 38px; --bench-gap: 8px; --bench-pad: 12px; }
    #page #main .entry-content .gpa-bench-row:not(#gpa-x) { font-size: 13px !important; min-height: 36px; }
    .gpa-bench-name small { font-size: 12px; }
    #page #main .entry-content .gpa-bench-fig--wide .gpa-bench-row:not(#gpa-x) { font-size: 12px !important; }
    #page #main .entry-content .gpa-bench-rank__in:not(#gpa-x) { grid-template-columns: 1fr; }
    .gpa-bench-ex { display: none; } /* phones: the field name alone keeps the table short */
}

/* ---------- hover a mark: its value (and what it is, when a row has two) ---------- */
:is(.gpa-bench-dot, .gpa-bench-bar, .gpa-bench-range)[data-tip] { cursor: default; }
:is(.gpa-bench-dot, .gpa-bench-range)[data-tip]::before { /* a bigger target than the 12px mark */
    content: "";
    position: absolute;
    inset: -8px;
}
:is(.gpa-bench-dot, .gpa-bench-bar, .gpa-bench-range)[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    z-index: 5;
    transform: translateX(-50%);
    padding: 4px 8px;
    border-radius: var(--gpa-radius-sm);
    background: var(--gpa-gray-900);
    color: var(--gpa-white);
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .12s ease;
}
.gpa-bench-bar[data-tip]::after { left: auto; right: 0; transform: translateX(50%); }
:is(.gpa-bench-dot, .gpa-bench-bar, .gpa-bench-range)[data-tip]:hover::after { opacity: 1; visibility: visible; }
.gpa-bench-dot[data-tip]:hover { transform: scale(1.25); }
.gpa-bench-dot:hover, .gpa-bench-range:hover, .gpa-bench-bar:hover { z-index: 6; }
@media (prefers-reduced-motion: reduce) {
    :is(.gpa-bench-dot, .gpa-bench-bar, .gpa-bench-range)[data-tip]::after { transition: none; }
    .gpa-bench-dot[data-tip]:hover { transform: none; }
}

/* Latin honors table ([gpa_honors show="table"], gpa-latin-honors.php): one calm row per university, the rule's
   details folded under its name, zebra rows, values in tabular figures */
#page #main .entry-content .gpa-hon-table table:not(#gpa-x) { table-layout: fixed; width: 100%; }
#page #main .entry-content .gpa-hon-table thead th:first-child:not(#gpa-x) { width: 40%; text-align: left !important; }
#page #main .entry-content .gpa-hon-table thead th:not(#gpa-x) { font-size: 13px; font-weight: 600; }
#page #main .entry-content .gpa-hon-table tbody :is(th, td):not(#gpa-x) { padding: 12px 14px !important; vertical-align: top; background: var(--gpa-surface); border-top: 1px solid var(--gpa-divider); }
#page #main .entry-content .gpa-hon-table tbody tr:nth-child(even of :not([hidden])) :is(th, td):not(#gpa-x) { background: var(--gpa-gray-50); }
#page #main .entry-content .gpa-hon-table tbody th:not(#gpa-x) { text-align: left !important; font-weight: 400; }
#page #main .entry-content .gpa-hon-table td:not(#gpa-x) { white-space: normal; text-align: center; }
#page #main .entry-content .gpa-hon-name { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--gpa-heading); }
#page #main .entry-content .gpa-hon-scope { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--gpa-text-muted); }
#page #main .entry-content .gpa-hon-v { display: block; font-size: 16px; font-weight: 600; line-height: 1.35; font-variant-numeric: tabular-nums; color: var(--gpa-heading); }
#page #main .entry-content .gpa-hon-table .gpa-bench-ex:not(#gpa-x) { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--gpa-text-muted); font-variant-numeric: tabular-nums; }
#page #main .entry-content .gpa-hon-lv:not(#gpa-x) { display: block; margin-bottom: 2px; font-size: 12px; line-height: 1.3; color: var(--gpa-text-muted); }
#page #main .entry-content .gpa-hon-rule:not(#gpa-x) { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--gpa-text-secondary); }
#page #main .entry-content .gpa-hon-rule summary { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; cursor: pointer; color: var(--gpa-link); font-weight: 500; list-style: none; }
#page #main .entry-content .gpa-hon-rule summary::-webkit-details-marker { display: none; }
#page #main .entry-content .gpa-hon-rule summary::after { content: ""; width: 6px; height: 6px; margin: -3px 0 0 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
#page #main .entry-content .gpa-hon-rule[open] summary::after { margin-top: 3px; transform: rotate(-135deg); }
#page #main .entry-content .gpa-hon-rule > span { display: block; margin-top: 4px; }
#page #main .entry-content .gpa-hon-table tr:target :is(th, td):not(#gpa-x) { background: var(--gpa-tint-blue); }
@media (max-width: 767px) {
    #page #main .entry-content .gpa-hon-table thead th:first-child:not(#gpa-x) { width: auto; }
    #page #main .entry-content .gpa-hon-table tbody :is(th, td):not(#gpa-x) { padding: 0 !important; border-top: 0 !important; background: none !important; }
    #page #main .entry-content .gpa-hon-table tbody tr:not(#gpa-x) { padding: 14px 16px; }
    #page #main .entry-content .gpa-hon-table tbody tr:nth-child(even of :not([hidden])):not(#gpa-x) { background: var(--gpa-gray-50); }
    #page #main .entry-content .gpa-hon-table tbody th:not(#gpa-x) { padding-bottom: 8px !important; }
    #page #main .entry-content .gpa-hon-table td:not(#gpa-x) { text-align: left !important; }
}

/* Latin honors levels side by side ([gpa_honors show="levels"]) */
#page #main .entry-content .gpa-hon-levels table:not(#gpa-x) { table-layout: fixed; width: 100%; }
#page #main .entry-content .gpa-hon-levels thead td:not(#gpa-x) { width: 28%; background: var(--gpa-surface); }
#page #main .entry-content .gpa-hon-levels thead th:not(#gpa-x) { padding: 16px 8px 14px !important; text-align: center !important; vertical-align: top; background: var(--gpa-surface); }
#page #main .entry-content .gpa-hon-levels__lv .gpa-hon-tile__step { margin: 0 auto 6px; display: flex; }
#page #main .entry-content .gpa-hon-levels__name { display: block; font-size: 15px; font-weight: 700; line-height: 1.25; color: var(--gpa-heading); }
#page #main .entry-content .gpa-hon-levels__mean { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--gpa-text-muted); }
#page #main .entry-content .gpa-hon-levels__lv--1 .gpa-hon-tile__step { color: var(--gpa-blue-700); }
#page #main .entry-content .gpa-hon-levels__lv--2 .gpa-hon-tile__step { color: var(--gpa-surface); background: var(--gpa-blue-700); border-color: var(--gpa-blue-700); opacity: .75; }
#page #main .entry-content .gpa-hon-levels__lv--3 .gpa-hon-tile__step { color: var(--gpa-surface); background: var(--gpa-heading); border-color: var(--gpa-heading); }
#page #main .entry-content .gpa-hon-levels tbody :is(th, td):not(#gpa-x) { padding: 12px 8px !important; text-align: center !important; background: var(--gpa-surface); font-variant-numeric: tabular-nums; }
#page #main .entry-content .gpa-hon-levels tbody th[scope="row"]:not(#gpa-x) { padding-left: 16px !important; text-align: left !important; font-size: 14px; font-weight: 500; color: var(--gpa-text-secondary); }
#page #main .entry-content .gpa-hon-levels tbody td strong { font-size: 20px; font-weight: 700; color: var(--gpa-heading); }
#page #main .entry-content .gpa-hon-levels__group th:not(#gpa-x) { padding: 8px 16px !important; text-align: left !important; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
#page #main .entry-content .gpa-hon-levels__group--fixed th:not(#gpa-x) { background: var(--gpa-tint-blue) !important; color: var(--gpa-blue-700); }
#page #main .entry-content .gpa-hon-levels__group--rank th:not(#gpa-x) { background: var(--gpa-amber-50) !important; color: var(--gpa-amber-800); }
@media (max-width: 640px) {
    #page #main .entry-content .gpa-hon-levels thead td:not(#gpa-x) { width: 25%; }
    #page #main .entry-content .gpa-hon-levels__name { font-size: 13px; }
    #page #main .entry-content .gpa-hon-levels__mean { display: none; }
    #page #main .entry-content .gpa-hon-levels tbody :is(th, td):not(#gpa-x) { padding: 10px 4px !important; font-size: 13px; }
    #page #main .entry-content .gpa-hon-levels tbody th[scope="row"]:not(#gpa-x) { padding-left: 10px !important; font-size: 12px; }
    #page #main .entry-content .gpa-hon-levels tbody td strong { font-size: 16px; }
}

/* Latin honors key figures ([gpa_honors show="facts"]): one panel per level, then the class-rank tile (D-79 blocks) */
#page #main .entry-content .gpa-hon-tiles:not(#gpa-x) {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto auto;
    gap: 12px;
    max-width: none !important;
    margin: 24px 0 0 !important;
    padding: 0 !important;
}
#page #main .entry-content .gpa-hon-tile {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid; /* title, number and meaning line up across the three tiles */
    row-gap: 0;
    margin: 0;
    padding: 16px 16px 14px;
    border: 1px solid var(--gpa-blue-200);
    border-radius: var(--gpa-radius-md);
    background: var(--gpa-tint-blue);
}
#page #main .entry-content .gpa-hon-tile dt {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-height: 24px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--gpa-blue-700);
}
#page #main .entry-content .gpa-hon-tile__step {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gpa-surface);
    border: 1px solid var(--gpa-blue-200);
    font-size: 12px;
    font-weight: 700;
}
#page #main .entry-content .gpa-hon-tile dd { margin: 0; }
#page #main .entry-content .gpa-hon-tile dd.gpa-hon-tile__gpa {
    margin-top: 10px;
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--gpa-heading);
}
#page #main .entry-content .gpa-hon-tile__plus { margin-left: 2px; font-size: 22px; vertical-align: top; color: var(--gpa-blue-700); }
#page #main .entry-content .gpa-hon-tile__of { font-size: 18px; font-weight: 600; color: var(--gpa-text-secondary); }
#page #main .entry-content .gpa-hon-tile dd.gpa-hon-tile__note { margin-top: 8px; font-size: 14px; line-height: 1.4; color: var(--gpa-text-secondary); }
#page #main .entry-content .gpa-hon-tile--rank { border-color: var(--gpa-amber-200); background: var(--gpa-amber-50); }
#page #main .entry-content .gpa-hon-tile--rank dt { color: var(--gpa-amber-800); }
#page #main .entry-content .gpa-hon-tile--rank .gpa-hon-tile__plus { color: var(--gpa-amber-800); }
#page #main .entry-content .gpa-bench-facts > p.gpa-hon-tiles__cap:not(#gpa-x):not(#gpa-y) { margin: 10px 0 0 !important; font-size: 13px !important; line-height: 1.5 !important; color: var(--gpa-text-muted) !important; text-align: left !important; }
/* the shared search picker above a sortable table */
#page #main .entry-content .gpa-search[data-gpa-find]:not(#gpa-x) { margin-top: 24px !important; margin-bottom: 16px !important; }
@media (max-width: 767px) {
    #page #main .entry-content .gpa-hon-tiles:not(#gpa-x) { gap: 8px; }
    #page #main .entry-content .gpa-hon-tile dt { flex-direction: column; gap: 6px; }
    #page #main .entry-content .gpa-hon-tile { padding: 14px 12px 12px; }
    #page #main .entry-content .gpa-hon-tile dd.gpa-hon-tile__gpa { font-size: 28px; }
    #page #main .entry-content .gpa-hon-tile dt { font-size: 13px; }
}

/* Latin honors table: visible college and year, condition tags, other honors names across the columns, filters */
#page #main .entry-content .gpa-hon-tile__name { padding-top: 2px; }
#page #main .entry-content .gpa-hon-old { margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--gpa-amber-50); color: var(--gpa-amber-800); font-size: 12px; font-weight: 600; white-space: nowrap; }
#page #main .entry-content .gpa-hon-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
#page #main .entry-content .gpa-hon-tag { padding: 2px 8px; border: 1px solid var(--gpa-amber-200); border-radius: 999px; background: var(--gpa-amber-50); color: var(--gpa-amber-800); font-size: 12px; font-weight: 600; line-height: 1.4; }
#page #main .entry-content .gpa-hon-none { font-size: 13px; color: var(--gpa-text-muted); }
#page #main .entry-content .gpa-hon-table td.gpa-hon-other:not(#gpa-x) { text-align: left !important; }
#page #main .entry-content .gpa-hon-otherlbl { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--gpa-text-muted); }
#page #main .entry-content .gpa-hon-owns { display: flex; flex-wrap: wrap; gap: 8px 20px; }
#page #main .entry-content .gpa-hon-own { display: block; }
#page #main .entry-content .gpa-hon-filters { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 16px; }
#page #main .entry-content .gpa-hon-seg { display: flex; flex-direction: column; gap: 6px; }
#page #main .entry-content .gpa-hon-seg__lbl { font-size: 13px; font-weight: 600; color: var(--gpa-text-secondary); }
#page #main .entry-content .gpa-hon-seg__opts { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--gpa-radius-md); background: var(--gpa-gray-100); }
#page #main .entry-content .gpa-hon-kind:not(#gpa-x) { min-height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 14px; font-weight: 500; color: var(--gpa-text-secondary); cursor: pointer; }
#page #main .entry-content .gpa-hon-kind[aria-pressed="true"]:not(#gpa-x) { background: var(--gpa-surface); color: var(--gpa-heading); font-weight: 600; box-shadow: var(--gpa-shadow-sm); }
#page #main .entry-content .gpa-hon-kind:focus-visible { outline: 2px solid var(--gpa-focus-ring); outline-offset: 1px; }
#page #main .entry-content p.gpa-hon-status:not(#gpa-x) { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 14px 0 0 !important; font-size: 14px; color: var(--gpa-text-secondary); }
#page #main .entry-content .gpa-hon-clear:not(#gpa-x) { padding: 0; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--gpa-link); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
#page #main .entry-content p.gpa-hon-more:not(#gpa-x) { margin: 16px auto 0 !important; text-align: center; }
@media (max-width: 767px) {
    #page #main .entry-content .gpa-hon-kind:not(#gpa-x) { padding: 0 10px; font-size: 13px; }
    #page #main .entry-content .gpa-hon-table td.gpa-hon-other:not(#gpa-x) { display: block; width: 100% !important; }
    #page #main .entry-content .gpa-hon-table td.gpa-hon-other[data-label]::before { display: none; }
}
#page #main .entry-content .gpa-hon-plan { display: block; margin-top: 6px; }
@media (max-width: 520px) {
    /* phones: one row per level, name and meaning left, the GPA right */
    #page #main .entry-content .gpa-hon-tiles:not(#gpa-x) { grid-template-columns: 1fr; grid-template-rows: none; }
    #page #main .entry-content .gpa-hon-tile { grid-row: auto; grid-template-rows: auto auto; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center; padding: 12px 14px; }
    #page #main .entry-content .gpa-hon-tile dt { grid-column: 1; grid-row: 1; flex-direction: row; align-items: center; gap: 8px; }
    #page #main .entry-content .gpa-hon-tile dd.gpa-hon-tile__note { grid-column: 1; grid-row: 2; margin-top: 2px; padding-left: 30px; }
    #page #main .entry-content .gpa-hon-tile dd.gpa-hon-tile__gpa { grid-column: 2; grid-row: 1 / span 2; margin: 0; font-size: 30px; }
}
/* Latin honors table: each row's stripe runs across the whole row, the university cell included (Digant 2026-10-13 21:20) */
#page #main .entry-content .gpa-hon-table tbody tr :is(th, td):not(#gpa-x):not(#gpa-y) { background: var(--gpa-surface) !important; }
#page #main .entry-content .gpa-hon-table tbody tr:nth-child(even of :not([hidden])) :is(th, td):not(#gpa-x):not(#gpa-y) { background: var(--gpa-gray-50) !important; }
#page #main .entry-content .gpa-hon-table tbody tr:target :is(th, td):not(#gpa-x):not(#gpa-y) { background: var(--gpa-tint-blue) !important; }
@media (max-width: 767px) {
    #page #main .entry-content .gpa-hon-table tbody tr :is(th, td):not(#gpa-x):not(#gpa-y) { background: transparent !important; }
    #page #main .entry-content .gpa-hon-table tbody tr:not(#gpa-x):not(#gpa-y) { background: var(--gpa-surface); }
    #page #main .entry-content .gpa-hon-table tbody tr:nth-child(even of :not([hidden])):not(#gpa-x):not(#gpa-y) { background: var(--gpa-gray-50); }
}
#page #main .entry-content .gpa-hon-table tbody tr :is(th, td):not(#gpa-x):not(#gpa-y) { border: 0 !important; border-top: 1px solid var(--gpa-divider) !important; box-shadow: none !important; }
@media (max-width: 767px) {
    #page #main .entry-content .gpa-hon-table tbody tr :is(th, td):not(#gpa-x):not(#gpa-y) { border-top: 0 !important; }
}
