/*
Theme Name: IETERNUS Kadence Child
Theme URI: https://ieternus.ai
Description: Presentation layer for IETERNUS Learning Systems. Kadence owns the global design system, header, footer, and page composition. This child theme carries only the custom-post-type archive templates Kadence has no knowledge of — sp_service and sp_topic — plus a small amount of presentation CSS.

    Business logic lives in the ieternus-core plugin and must never move here: no post types, no
    taxonomies, no meta registration, no privacy rules, no SEO output. If a change would still be
    required after switching theme, it belongs in the plugin.

    Legacy note: database identifiers keep the SignalPath-era `sp_` prefix by decision D-002.
    No buyer ever sees them, and renaming them requires a migration map, redirects, and backups.
Author: IETERNUS Learning Systems
Template: kadence
Version: 1.0.1
License: GPL-2.0-or-later
Text Domain: ieternus-kadence-child
*/

/* ---------------------------------------------------------------------------
   Contract blocks rendered by ieternus-core (D-019).
   These carry no layout of their own in the plugin, so the styling lives here.
   --------------------------------------------------------------------------- */

.answer-box {
    border-left: 4px solid var(--global-palette1, #1f2933);
    background: var(--global-palette8, #f7f8f9);
    padding: 1.25rem 1.5rem;
    margin: 0 0 2rem;
}

.answer-box strong {
    display: block;
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.answer-box p {
    margin: 0;
}

.review-note,
.related-service {
    border-top: 1px solid var(--global-gray-400, #d9dee2);
    padding-top: 1.25rem;
    margin-top: 2.5rem;
}

.review-note p {
    margin: 0 0 0.25rem;
    font-size: 0.9375rem;
}

.related-service .eyebrow,
.topic-links {
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.related-service h2 {
    margin: 0.25rem 0 0.5rem;
    font-size: 1.375rem;
}

.sp-cta {
    background: var(--global-palette8, #f7f8f9);
    border: 1px solid var(--global-gray-400, #d9dee2);
    padding: 2rem;
    margin-top: 3rem;
}

.sp-cta h2 {
    margin-top: 0;
}

/*
   Long tables in answer articles must scroll rather than break the layout — but NOT via
   `display: block` on the table itself. That was the first thing tried here and it is wrong:
   it removes the table's implicit ARIA role, and with it every row and column-header
   relationship, so a screen reader announces a carefully marked-up comparison table as a run
   of plain text (WCAG 1.3.1). It also makes the table its own scroll container with no
   tabindex, which a keyboard-only user cannot scroll (2.1.1).

   Scroll the wrapper instead. `ieternus_wrap_content_tables()` in the plugin wraps each table
   in `.table-scroll`, which is focusable and carries a region role.
*/
.table-scroll {
    overflow-x: auto;
    max-width: 100%;
}

.content-body table,
.entry-content table {
    max-width: 100%;
    border-collapse: collapse;
}

/* ---------------------------------------------------------------------------
   Footer contrast

   Kadence's defaults put footer links at --global-palette5 (#6f6f6f) on a
   --global-palette3 (#1e1e1e) footer: 3.32:1, below the 4.5:1 AA minimum. Worse,
   the *current* page's link was painted --global-palette3 — the background colour
   itself, 1.0:1, literally invisible — on every page whose URL matches a footer
   menu item.

   Set here rather than through a theme mod because the customizer key was not the
   one it looked like, and a stylesheet rule is verifiable by reading the page.

   Hardened 2026-08-28: the rules below are prefixed with `body` so they win on
   specificity, not on load order. Kadence emits an identical selector inline in
   the head; my override previously beat it only because the child <link> happens
   to sit later in the document. That is a load-order tie — a second audit flagged
   the footer as failing AA precisely because it read the CSS without resolving the
   cascade, and it was right to distrust the tie: any plugin that inlines or reorders
   the child stylesheet ahead of Kadence's would silently revert the fix. `body`
   raises specificity to (1,2,4) vs Kadence's (1,2,3) so the override is
   unconditional. Same reasoning retired the "dead current-menu-item rule" landmine
   the audit noted: it is explicitly overridden here rather than left to chance. */

body #colophon .footer-navigation .footer-menu-container > ul > li > a {
    color: #d7dade;          /* 11.4:1 on #1e1e1e */
}

body #colophon .footer-navigation .footer-menu-container > ul li.current-menu-item > a,
body #colophon .footer-navigation .footer-menu-container > ul li a:hover,
body #colophon .footer-navigation .footer-menu-container > ul li a:focus-visible {
    color: #ffffff;          /* 15.3:1 */
}

body #colophon .footer-navigation .footer-menu-container > ul li.current-menu-item > a {
    text-decoration: underline;
    text-underline-offset: 0.25em;
}

/* Never signal state by colour alone. */
#colophon a:focus-visible,
.site-header a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
   Commercial-line archive grouping
   --------------------------------------------------------------------------- */

.line-group {
    margin-bottom: 3.5rem;
}

.line-group > h2 {
    margin-bottom: 0.25rem;
}

.line-group > .line-outcome {
    margin-top: 0;
    max-width: 46rem;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.service-grid .service-card {
    border: 1px solid var(--global-gray-400, #d9dee2);
    padding: 1.5rem;
}

.service-grid .service-card h3 {
    margin-top: 0;
    font-size: 1.1875rem;
}

.service-grid .service-card p {
    margin-bottom: 0;
}
