/* ================================
    Block layout & custom-block styles
================================ */

/* Editor color palette — `.has-{slug}-color` and `.has-{slug}-background-color`
   classes are emitted by Gutenberg when an editor picks a palette color.
   Mapped here to the design tokens in variables.css so palette changes flow
   through one place. Slugs match those registered in functions.php. */
.has-primary-color           { color: var(--color-primary); }
.has-primary-background-color { background-color: var(--color-primary); }
.has-black-color             { color: var(--color-black); }
.has-black-background-color  { background-color: var(--color-black); }
.has-white-color             { color: var(--color-white); }
.has-white-background-color  { background-color: var(--color-white); }
.has-gray-color              { color: var(--color-gray); }
.has-gray-background-color   { background-color: var(--color-gray); }
.has-gray-dark-color         { color: var(--color-gray-dark); }
.has-gray-dark-background-color    { background-color: var(--color-gray-dark); }
.has-gray-medium-color       { color: var(--color-gray-medium); }
.has-gray-medium-background-color  { background-color: var(--color-gray-medium); }
.has-gray-light-color        { color: var(--color-gray-light); }
.has-gray-light-background-color   { background-color: var(--color-gray-light); }
.has-gray-lighter-color      { color: var(--color-gray-lighter); }
.has-gray-lighter-background-color { background-color: var(--color-gray-lighter); }
.has-bg-color                { color: var(--color-bg); }
.has-bg-background-color     { background-color: var(--color-bg); }
.has-tag-bg-color            { color: var(--color-tag-bg); }
.has-tag-bg-background-color { background-color: var(--color-tag-bg); }

/* ================================
    details open animation — applies to all accordion blocks
================================ */
@keyframes ta-details-open {
    from {
        opacity: 0;
        translate: 0 -6px;
    }
    to {
        opacity: 1;
        translate: 0 0;
    }
}

details[open] > *:not(summary) {
    animation: ta-details-open 0.25s ease;
}

/* 12-column grid — opt-in via templates that wrap the_content() in .ta-grid */
.ta-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--spacing-lg); /* 24px */
    row-gap: var(--spacing-xl);    /* 96px desktop, 48/24px on smaller breakpoints */
    align-content: start;
}

.page-session .ta-grid {
    row-gap: 4rem;
}

.page-session .ta-grid h1 {
    margin: 0;
}

.ta-grid h1,
.ta-grid h2 {
    font-size: 2rem;
    line-height: 2rem;
    letter-spacing: 0.33px;
    margin-bottom: 4rem;
}

.ta-grid .wp-block-group h1,
.ta-grid h2 {
    margin-top: 1.125rem;
    margin-bottom: 1.125rem;
}

.ta-grid h2 + h2 {
    margin-top: 0;
}

/* Body & subheading defaults for .ta-grid content (mirrors Figma):
   Suisse Book 18/24 for paragraphs; Suisse Semi Bold 18/24 for h3. */
.ta-grid p,
.ta-grid li {
    font-size: var(--font-size-medium);   /* 18px */
    line-height: var(--line-height-medium); /* 1.33 → 24px */
    color: var(--color-black);
    font-weight: var(--font-weight-book);
}

.ta-grid .wp-block-details > summary + p {
    margin-top: 1.5rem;
}

.ta-grid .wp-block-details > p:last-child,
.ta-grid .wp-block-details > ul:last-child
.ta-grid .wp-block-details > ol:last-child {
    margin-bottom: 1.5rem;
}

.ta-grid .wp-block-details > p,
.ta-grid .wp-block-details > ol,
.ta-grid .wp-block-details > ul,
.ta-grid .wp-block-details > h2,
.ta-grid .wp-block-details > h3,
.ta-grid .wp-block-details > h4 {
    margin-left: 11.11%;
    margin-right: 22.22%;
}

.ta-grid .wp-block-details > ol,
.ta-grid .wp-block-details > ul {
    margin-left: 22.22%;
    margin-right: 11.11%;
}

.ta-grid .wp-block-details > * + * {
    margin-top: 1.5rem;
}

.ta-grid h3 {
    font-size: var(--font-size-medium);   /* 18px */
    line-height: var(--line-height-medium); /* 24px */
    font-weight: var(--font-weight-semibold);
    color: var(--color-black);
    margin: 0 0 var(--spacing-sm); /* 12px */
}

.ta-grid h3 strong {
    font-weight: var(--font-weight-semibold);
}

.ta-grid a {
    color: inherit;
    text-decoration: underline;
    text-decoration-skip-ink: none;
    transition: color var(--transition-fast);
}

.ta-grid a:hover,
.ta-grid a:focus {
    color: var(--color-primary);
}

/* Small-text variant for captions (the 4-col paragraph next to the image) */
.is-style-ta-small,
.ta-grid .is-style-ta-small,
.ta-grid .is-style-ta-small p,
.ta-grid .is-style-ta-small li {
    font-size: 0.75rem; /* 12px */
    line-height: 1.4167; /* 17px */
}

/* Image: subtle rounding to match site card aesthetic */
.ta-grid img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md); /* 16px */
    display: block;
}

/* Lists — restore marker indent (the global * { padding: 0; } reset strips it) */
.ta-grid ul,
.ta-grid ol {
    padding-left: 1.25rem; /* 20px */
    list-style-position: outside;
}

.ta-grid ul { list-style-type: disc; }
.ta-grid ol { list-style-type: decimal; }

.ta-grid li + li {
    margin-top: var(--spacing-xs); /* 8px */
}

.ta-grid li::marker {
    color: currentColor;
}

/* Span utilities (use directly via Block → Advanced → Additional CSS Class) */
.ta-col-1  { grid-column: span 1; }
.ta-col-2  { grid-column: span 2; }
.ta-col-3  { grid-column: span 3; }
.ta-col-4  { grid-column: span 4; }
.ta-col-5  { grid-column: span 5; }
.ta-col-6  { grid-column: span 6; }
.ta-col-7  { grid-column: span 7; }
.ta-col-8  { grid-column: span 8; }
.ta-col-9  { grid-column: span 9; }
.ta-col-10  { grid-column: span 10; }
.ta-col-11  { grid-column: span 11; }
.ta-col-12 { grid-column: 1 / -1; }

/* Explicit start utilities (offsets) */
.ta-start-2 { grid-column-start: 2; }
.ta-start-3 { grid-column-start: 3; }

/* Pre-composed pairings used by registered block styles */
.is-style-ta-col-1            { grid-column: span 1; }
.is-style-ta-col-2            { grid-column: span 2; }
.is-style-ta-col-3            { grid-column: span 3; }
.is-style-ta-col-4            { grid-column: span 4; }
.is-style-ta-col-5            { grid-column: span 5; }
.is-style-ta-col-6            { grid-column: span 6; }
.is-style-ta-col-7            { grid-column: span 7; }
.is-style-ta-col-8            { grid-column: span 8; }
.is-style-ta-col-9            { grid-column: span 9; }
.is-style-ta-col-10            { grid-column: span 10; }
.is-style-ta-col-11            { grid-column: span 11; }
.is-style-ta-col-12           { grid-column: 1 / -1; }
.is-style-ta-col-6-indent-1   { grid-column: 2 / span 6; }
.is-style-ta-col-9-indent-3   { grid-column: 4 / span 9; }

/* The 4-col indent-2 cell is the small caption per Figma — small typography baked in */
.is-style-ta-col-4-indent-2 {
    grid-column: 3 / span 4;
    font-size: 0.75rem;     /* 12px */
    line-height: 1.4167;    /* 17px */
}
p.is-style-ta-col-4-indent-2,
.is-style-ta-col-4-indent-2 p,
.is-style-ta-col-4-indent-2 li,
.is-style-ta-col-4-indent-2 a {
    font-size: 0.75rem;
    line-height: 1.4167;
}

/* Nested grids — any column cell that contains column-spanned descendants
   becomes a subgrid, so its children resolve against the cell's own tracks
   (a 9-col cell exposes 9 tracks, not 12). Works for both flat children
   and children wrapped in Gutenberg's __inner-container. */
.ta-grid .wp-block-group__inner-container {
    display: contents;
}

[class*="ta-col"]:has([class*="ta-col"]) {
    display: grid;
    grid-template-columns: subgrid;
    row-gap: var(--spacing-lg);
    align-content: start;
}

/* Within a subgrid cell, children without a column class span the full cell width.
   Two selectors cover both layouts: direct children and __inner-container-wrapped children. */
[class*="ta-col"]:has([class*="ta-col"]) > *:not([class*="ta-col"]):not(.wp-block-group__inner-container),
[class*="ta-col"]:has([class*="ta-col"]) > .wp-block-group__inner-container > *:not([class*="ta-col"]) {
    grid-column: 1 / -1;
}

/* h2 styled as h1 (used for in-page anchor targets) */
.is-style-ta-h1 {
    font-size: var(--font-size-large);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-large);
    letter-spacing: var(--letter-spacing-tight);
    color: var(--color-black);
}

/* core/details — pill-style summary with chevron, primary on open
   Markup: <details><summary>Title</summary> body... </details> */
.ta-grid details {
    background: transparent;
}

.ta-grid details:not(.ta-archive-links__year) + details {
    margin-top: calc(0.5rem - 1.5rem);
}

.ta-grid details.ta-archive-links__year + details {
    margin-top: 0.5rem;
}

.ta-grid details > summary {
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);            /* 12px */
    padding: 6px;
    background-color: var(--color-white);
    border-radius: 6px;
    cursor: pointer;
    list-style: none;
    color: var(--color-black);
    font-family: var(--font-family);
    font-size: var(--font-size-medium);    /* 18px */
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-medium); /* 24px */
    transition: color var(--transition-fast);
}

.ta-grid details > summary::-webkit-details-marker { display: none; }
.ta-grid details > summary::marker               { content: none; }

.ta-grid details > summary:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Custom chevron (12×9). currentColor via mask so it follows summary color. */
.ta-grid details > summary::before {
    content: "";
    flex-shrink: 0;
    display: inline-block;
    width: 12px;
    height: 9px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 9'><path d='M5.43541 9L0.14112 1.24093C-0.0926993 0.898118 -0.0294134 0.412197 0.282439 0.155114C0.594322 -0.101892 1.0364 -0.0323296 1.27029 0.310447L6 7.24209L10.7297 0.310448C10.9636 -0.0323296 11.4057 -0.101891 11.7176 0.155115C12.0294 0.412198 12.0927 0.898119 11.8589 1.24093L6.56459 9L5.43541 9Z'/></svg>") no-repeat center / contain;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 9'><path d='M5.43541 9L0.14112 1.24093C-0.0926993 0.898118 -0.0294134 0.412197 0.282439 0.155114C0.594322 -0.101892 1.0364 -0.0323296 1.27029 0.310447L6 7.24209L10.7297 0.310448C10.9636 -0.0323296 11.4057 -0.101891 11.7176 0.155115C12.0294 0.412198 12.0927 0.898119 11.8589 1.24093L6.56459 9L5.43541 9Z'/></svg>") no-repeat center / contain;
    transition: transform var(--transition-fast);
}

.ta-grid details > summary.ta-faq__header::before {
    display: none;
}

.ta-grid details[open] > summary {
    color: var(--color-primary);
}

.ta-grid details[open] > summary::before {
    transform: rotate(180deg);
}

/* Body content (anything inside details that's not the summary) — indented to
   align with the summary text (past padding 6 + chevron 12 + gap 12 = 30px). */
.ta-grid details > *:not(summary) {
    margin-top: 0.5rem;
}

.ta-grid details > *:not(summary) + *:not(summary) {
    margin-top: var(--line-height-medium); /* preserves paragraph rhythm */
}

/* Mobile: collapse the grid; everything spans full width */
@media (max-width: 64rem) {
    .ta-grid {
        grid-template-columns: 1fr;
        row-gap: var(--spacing-lg); /* 24px */
    }
    .ta-grid > * { grid-column: 1 / -1 !important; }

    /* Subgrid containers inherit only 1 track on mobile — switch to a plain
       1-col grid so children with span-N don't create unwanted implicit columns */
    [class*="ta-col"]:has([class*="ta-col"]) {
        grid-template-columns: 1fr;
    }
    /* Reset all nested column spans inside .ta-grid to full width */
    .ta-grid [class*="ta-col"] {
        grid-column: 1 / -1 !important;
    }
}

/* ================================
    ta/internal-nav
================================ */
.ta-internal-nav {
    background-color: var(--color-white);
    border-radius: var(--radius-md); /* 16px */
    padding: 1rem; /* 16px */
    align-self: start;
    margin-right: 30%;
    position: sticky;
    top: calc(var(--header-height) + 2*var(--spacing-lg)); /* clears fixed header + 24px breathing room */
}

.ta-internal-nav ul {
    list-style-type: none;
    display: block;
    gap: 0;
    padding: 0;
}

.ta-internal-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm); /* 12px */
}

.ta-internal-nav__link {
    display: block;
    width: 100%;
    color: var(--color-gray-dark);
    font-family: var(--font-family);
    font-size: 1rem; /* 16px */
    /* font-weight: var(--font-weight-semibold); */
    line-height: 1.25; /* 20px */
    text-decoration: none !important;
    transition: color var(--transition-fast);
}

.ta-internal-nav__link:hover,
.ta-internal-nav__link:focus,
.ta-internal-nav__link.is-active,
.ta-internal-nav__item.is-active .ta-internal-nav__link {
    color: var(--color-primary);
}

@media (max-width: 64rem) {
    .ta-internal-nav {
        position: static;
        margin-right: 0;
    }
}

/* ================================
    ta/download-list
================================ */
.ta-download-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm); /* 12px */
    list-style-type: none !important;
    padding-left: 0 !important;
}

.ta-download-list__item {
    margin: 0;
    padding: 0;
}

.ta-download-list__link {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg); /* 24px */
    padding: var(--spacing-lg); /* 24px */
    background-color: var(--color-white);
    border-radius: var(--radius-sm); /* 12px */
    color: var(--color-black);
    font-family: var(--font-family);
    font-size: var(--font-size-medium); /* 18px */
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-medium); /* 24px */
    text-decoration: none;
    transition: var(--transition-fast) !important;
    text-decoration: none !important;
}

.ta-download-list__link:hover,
.ta-download-list__link:focus {
    color: var(--color-primary);
}

.ta-download-list__icon {
    flex-shrink: 0;
    width: 2.25rem;     /* 36px */
    height: 3rem;       /* 48px */
    line-height: 0;
}

.ta-download-list__icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.ta-download-list__title {
    flex: 1;
    min-width: 0;
}

/* ================================
    ta/block-links
================================ */
.ta-block-links {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg); /* 24px */
}

.ta-block-links__card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    aspect-ratio: 4 / 3;
    background-color: var(--color-white);
    border-radius: var(--radius-xl); /* 24px */
    padding: var(--spacing-lg); /* 24px */
    text-decoration: none !important;
    color: var(--color-black);
    transition: all var(--transition-base);
}

.ta-block-links__card:hover,
.ta-block-links__card:focus-visible {
    background-color: var(--color-primary);
    color: var(--color-white) !important;
}

.ta-block-links__title {
    font-family: var(--font-family);
    font-size: 1.5rem;
    font-weight: var(--font-weight-medium);
    line-height: 1.1667;
    color: inherit;
}

.ta-block-links__icon {
    display: block;
    width: auto;
    max-height: 6.25rem;     /* 100px — matches Figma icon height */
    object-fit: contain;
    flex-shrink: 0;
    align-self: flex-start;
    border-radius: 0 !important;
    transition: all var(--transition-base);
}

.ta-block-links__card:hover .ta-block-links__icon,
.ta-block-links__card:focus-visible .ta-block-links__icon {
    transform: rotate(90deg);
    filter: brightness(0) invert(1);
}

@media (max-width: 64rem) {
    .ta-block-links {
        grid-template-columns: 1fr;
    }

    .ta-block-links__card {
        min-height: unset;
    }

    .ta-block-links__icon {
        max-width: 100%;
        height: auto;
        max-height: 5rem;
    }
}

/* ================================
    ta/page-nav
================================ */
.ta-page-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);          /* 8px */
    justify-content: flex-end;
    align-items: center;
    justify-self: end;
    align-self: start;
}

.ta-page-nav__pill {
    display: inline-flex;
    align-items: center;
    padding: 1rem 1.5rem;            /* 16px 24px — Figma: py-16 px-24 */
    border-radius: var(--radius-sm); /* 12px */
    background-color: var(--color-white);
    color: var(--color-black);
    font-family: var(--font-family);
    font-size: var(--font-size-base); /* 15px */
    font-weight: var(--font-weight-book);
    line-height: var(--line-height-tight);
    text-decoration: none !important;
    white-space: nowrap;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.ta-page-nav__pill.is-active,
.ta-page-nav__pill:hover,
.ta-page-nav__pill:focus-visible {
    background-color: var(--color-primary);
    color: var(--color-white) !important;
}

@media (max-width: 64rem) {
    .ta-page-nav {
        justify-content: flex-start;
        justify-self: start;
        width: 100%;
    }
}

/* ================================
    ta/calendar
================================ */
.ta-calendar {
    background-color: var(--color-white);
    border-radius: var(--radius-md);  /* 16px */
    overflow: hidden;
}

.ta-calendar__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.ta-calendar__item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);           /* 12px */
    padding: 1.5rem;                  /* 24px */
    border-bottom: 1px solid var(--color-gray-light);
}

.ta-calendar__item:not(:nth-child(3n)) {
    border-right: 1px solid var(--color-gray-light);
}

.ta-calendar__item:nth-last-child(-n+3) {
    border-bottom: none;
}

.ta-calendar__item:nth-child(2),
.ta-calendar__item:nth-child(3) {
    border-bottom: 1px solid var(--color-gray-light);
}

.ta-calendar__dates {
    font-family: var(--font-family);
    font-size: 1rem;                  /* 16px */
    font-weight: var(--font-weight-semibold);
    line-height: 1.25;               /* 20px */
    color: var(--color-primary);
}

.ta-calendar__desc {
    font-family: var(--font-family);
    font-size: 1rem;                  /* 16px */
    font-weight: var(--font-weight-book);
    line-height: 1.5;                /* 24px */
    color: var(--color-black);
}

@media (max-width: 64rem) {
    .ta-calendar__grid {
        grid-template-columns: 1fr;
    }

    .ta-calendar__item:not(:nth-child(3n)) {
        border-right: none;
    }

    .ta-calendar__item:nth-last-child(-n+3) {
        border-bottom: 1px solid var(--color-gray-light);
    }

    .ta-calendar__item:last-child {
        border-bottom: none;
    }
}

/* ================================
    core/button — session page style
================================ */
.ta-grid .wp-block-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);          /* 8px */
    align-items: center;
}

.ta-grid .wp-block-button__link {
    background-color: var(--color-primary) !important;
    color: var(--color-white) !important;
    padding: 0.625rem !important;    /* 10px */
    border-radius: 0.625rem !important; /* 10px */
    font-family: var(--font-family);
    font-size: var(--font-size-base); /* 15px */
    font-weight: var(--font-weight-book);
    line-height: var(--line-height-tight);
    text-decoration: none !important;
    border: none;
    display: inline-block;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.ta-grid .wp-block-button__link:hover,
.ta-grid .wp-block-button__link:focus-visible {
    background-color: var(--color-black) !important;
    color: var(--color-white) !important;
}

/* ================================
    core/buttons — gray-links style
================================ */
.ta-grid .wp-block-buttons.is-style-ta-gray-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    grid-column: span 4 !important;
}

.ta-grid .wp-block-buttons.is-style-ta-gray-links .wp-block-button__link {
    background-color: var(--color-gray-dark) !important;
    color: var(--color-white) !important;
    padding: 0.625rem !important;
    border-radius: 0.625rem !important;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-book);
    line-height: 1.0625;
    text-decoration: none !important;
    border: none;
    white-space: normal;
    text-align: left;
}

.ta-grid .wp-block-buttons.is-style-ta-gray-links .wp-block-button__link:hover {
    color: var(--color-gray-dark) !important;
    background-color: var(--color-white) !important;
}

/* ================================
    core/file — download card
================================ */
.ta-grid .wp-block-file {
    background-color: var(--color-white);
    border-radius: var(--radius-sm);
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.ta-grid .wp-block-file .wp-block-file__embed {
    border-radius: var(--radius-sm);
    margin-bottom: 0;
    width: calc(100% + var(--spacing-lg) * 2);
    height: 600px;
}

.ta-grid .wp-block-file > a:not(.wp-block-file__button) {
    color: var(--color-black);
    font-family: var(--font-family);
    font-size: var(--font-size-medium);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-medium);
    text-decoration: none;
    flex: 1;
    min-width: 0;
    transition: color var(--transition-fast);
}

.ta-grid .wp-block-file > a:not(.wp-block-file__button):hover {
    color: var(--color-primary);
}

.ta-grid .wp-block-file .wp-block-file__button {
    background-color: var(--color-primary) !important;
    color: var(--color-white) !important;
    padding: 0.625rem !important;
    border-radius: 0.625rem !important;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-book);
    line-height: var(--line-height-tight);
    text-decoration: none !important;
    border: none;
    flex-shrink: 0;
    transition: background-color var(--transition-fast);
    margin: 0;
    text-align: center;
}

.ta-grid .wp-block-file .wp-block-file__button:hover {
    background-color: var(--color-black) !important;
}

/* ================================
    ta-details-body — white card container inside core/details
================================ */
.ta-grid details > .is-style-ta-details-body {
    padding: 0.5rem 1.5rem;
}

.is-style-ta-details-body,
.is-style-ta-details-body > .wp-block-group__inner-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);           /* 24px between table and button */
}

.is-style-ta-details-body {
    background-color: var(--color-white);
    border-radius: var(--radius-sm);  /* 12px */
    padding: var(--spacing-lg);       /* 24px */
}

/* ================================
    ta/data-table — 2-column document table
================================ */
.ta-data-table {
    width: 100%;
    margin-bottom: 2.5rem;
}

.ta-data-table table {
    width: 100%;
    border-collapse: collapse;
}

.ta-data-table th,
.ta-data-table td {
    padding: 1.5rem 0;               /* 24px top/bottom; container handles horizontal */
    font-size: 1rem;                 /* 16px */
    line-height: 1.25;               /* 20px */
    color: var(--color-black);
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--color-gray-light);
}

.ta-data-table thead th {
    padding-top: 0;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-gray-light) !important;
}

.ta-data-table tbody td {
    padding-top: 0.5rem;
}

.ta-data-table tr:last-child th,
.ta-data-table tr:last-child td {
    border-bottom: none;
}

.ta-data-table th {
    font-weight: var(--font-weight-semibold);
}

.ta-data-table td {
    font-weight: var(--font-weight-book);
}

.ta-data-table th:first-child,
.ta-data-table td:first-child {
    width: 30%;
    padding-right: var(--spacing-lg); /* 24px column gap */
    font-weight: var(--font-weight-semibold);
}

@media (max-width: 64rem) {
    .ta-data-table th,
    .ta-data-table td {
        display: block;
        padding: var(--spacing-xs) 0;
    }

    .ta-data-table th:first-child,
    .ta-data-table td:first-child {
        width: auto;
        padding-right: 0;
        border-bottom: none;
        padding-bottom: 0;
    }

    .ta-data-table tr:not(:last-child) td:last-child,
    .ta-data-table tr:not(:last-child) th:last-child {
        border-bottom: 1px solid var(--color-gray-light);
        padding-bottom: var(--spacing-sm);
    }
}

/* ================================
    h4 heading
================================ */
.ta-grid h4 {
    font-size: 1.5rem;               /* 24px — Figma: Suisse Intl Medium 24/28 */
    font-weight: var(--font-weight-medium);
    line-height: 1.1667;             /* 28px */
    color: var(--color-black);
    margin: 0 0 var(--spacing-sm);
    margin-top: 2.5rem;
}

.ta-grid h2 + h4 {
    margin-top: 0;
}

.ta-grid ul + h4 {
    margin-top: 0.75rem;
}

/* ================================
    ta/jury — jury members grid
================================ */
.ta-jury {
    margin-top: 0.5rem;
    margin-bottom: 2.375rem;
}

/* Header: title (3fr) | spacer (1fr) | description (5fr) = 9fr */
.ta-jury__header {
    display: grid;
    grid-template-columns: 3fr 5fr 1fr;
    align-items: start;
    margin-bottom: 5.75rem;
}

p.ta-jury__heading {
    font-family: var(--font-family);
    font-size: var(--font-size-large);      /* 33px */
    font-weight: var(--font-weight-medium); /* 500 */
    line-height: var(--line-height-large);  /* 1 → 33px */
    letter-spacing: -0.01em;                /* -0.33px at 33px */
    color: var(--color-gray-medium);        /* #7d7d7d */
    margin: 0;
    grid-column: 1;
}

p.ta-jury__description {
    font-family: var(--font-family);
    font-size: var(--font-size-medium);    /* 18px */
    font-weight: var(--font-weight-book);  /* 450 */
    line-height: var(--line-height-medium); /* 24px */
    color: var(--color-black);
    margin: 0;
    grid-column: 2;
}

/* Card grid: 9fr = 2fr card | 1fr gap | 2fr card | 1fr gap | 2fr card | 1fr trail */
.ta-jury__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr 1fr 2fr 1fr;
    row-gap: 2.25rem;
}

/* Place each card in its 2fr column, skipping the 1fr spacer columns */
.ta-jury__card:nth-child(3n+1) { grid-column: 1; }
.ta-jury__card:nth-child(3n+2) { grid-column: 3; }
.ta-jury__card:nth-child(3n+3) { grid-column: 5; }

.ta-jury__card {
    display: flex;
    flex-direction: column;
}

.ta-jury__photo {
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-md); /* 16px */
    overflow: hidden;
    width: 100%;
}

.ta-jury__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ta-jury__meta {
    display: flex;
    flex-direction: column;
    margin-top: 1rem;               /* 16px — Figma gap between photo and text */
    margin-right: calc(-50% + 1.5rem);
}

p.ta-jury__name,
p.ta-jury__role,
p.ta-jury__info {
    font-family: var(--font-family);
    font-size: 1rem;                 /* 16px */
    line-height: 1.25;               /* 20px */
    color: var(--color-black);
    margin: 0;
}

p.ta-jury__name {
    font-weight: var(--font-weight-medium); /* 600 */
}

p.ta-jury__role,
p.ta-jury__info {
    font-weight: 400;
}

@media (max-width: 64rem) {
    .ta-jury__header {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
        margin-bottom: 2rem;
    }

    .ta-jury__description {
        grid-column: 1;
    }

    .ta-jury__grid {
        grid-template-columns: 1fr 1fr;
        row-gap: 2.5rem;
    }

    .ta-jury__card:nth-child(3n+1),
    .ta-jury__card:nth-child(3n+2),
    .ta-jury__card:nth-child(3n+3) {
        grid-column: auto;
    }

    .ta-jury__meta {
        margin-right: 0;
    }
}

@media (max-width: 40rem) {
    .ta-jury__grid {
        grid-template-columns: 1fr;
    }
}

/* ================================
    ta/faq — grouped Q&A accordion
================================ */
.ta-faq {
    display: flex;
    flex-direction: column;
    gap: 2rem;                       /* 32px between accordion groups */
}

.ta-faq details {
    background: transparent;
}

.ta-faq details > summary {
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);          /* 24px */
    padding: 2.25rem 1.5rem;         /* 36px 24px — Figma: py-36 px-24 */
    background-color: var(--color-white);
    border-radius: var(--radius-xl); /* 24px */
    cursor: pointer;
    list-style: none;
    color: var(--color-black);
    font-family: var(--font-family);
    font-size: 2.25rem;              /* 36px — Figma: Suisse Intl Book 36/44 */
    font-weight: var(--font-weight-book);
    line-height: 1.2222;             /* 44px */
    transition: color var(--transition-fast);
}

.ta-faq details > summary::-webkit-details-marker { display: none; }
.ta-faq details > summary::marker               { content: none; }

.ta-faq details > summary:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.ta-faq__chevron {
    flex-shrink: 0;
    display: inline-flex;
    width: 42px;
    height: 23px;
    transition: transform var(--transition-base);
}

.ta-faq details[open] > summary .ta-faq__chevron {
    transform: rotate(180deg);
}

.ta-faq__items {
    display: flex;
    flex-direction: column;
    margin-top: 2rem !important;
    padding: 0;
}

.ta-faq__item {
    display: grid;
    grid-template-columns: 4fr 5fr;
    gap: 1.5rem;                     /* 24px between Q and A */
    padding: 2rem 0 2rem 1.5rem;
    align-items: start;
}

.ta-faq__item:first-child {
    padding-top: 0;
}

.ta-faq__item + .ta-faq__item {
    border-top: 1px solid var(--color-gray-light);
}

/* ================================
    ta/archive-links — filterable document archive
    Sidebar and content are rendered by separate shortcodes and placed
    side-by-side via a Gutenberg Columns block — no grid wrapper needed here.
================================ */

/* ---- Sidebar ---- */
.ta-archive-links__sidebar {
    display: flex;
    flex-direction: column;
    gap: 0;
    grid-column: span 2;
}

.ta-archive-links__year > summary {
    list-style: none;
}
.ta-archive-links__year > summary::-webkit-details-marker { display: none; }
.ta-archive-links__year > summary::marker               { content: none; }

.ta-grid details > summary.ta-archive-links__year-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--color-white);
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    user-select: none;
    line-height: 0.75rem !important;
}

.ta-archive-links__year-summary:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.ta-archive-links__year-chevron {
    flex-shrink: 0;
    display: inline-flex;
    color: var(--color-primary);
    transition: transform var(--transition-fast);
}

.ta-archive-links__year[open] > .ta-archive-links__year-summary .ta-archive-links__year-chevron {
    transform: rotate(180deg);
}

.ta-archive-links__year-label {
    font-family: var(--font-family);
    font-size: var(--font-size-medium);    /* 18px */
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-medium);
}

/* Category buttons inside year details */
.ta-archive-links__year-cats {
    display: flex;
    flex-direction: column;
    margin-top: 1.875rem !important;
}

.ta-archive-links__cat {
    display: flex;
    align-items: center;
    width: 100%;
    border: none;
    border-top: 1px solid var(--color-gray-dark);
    padding: 0.5rem 0 1rem 0.75rem;
    background: none;
    font-family: var(--font-family);
    font-size: 1rem;                       /* 16px */
    font-weight: var(--font-weight-book);
    line-height: 1.25;                     /* 20px */
    color: var(--color-gray-dark);
    cursor: pointer;
    text-align: left;
    transition: color var(--transition-fast);
}

.ta-archive-links__cat:hover {
    color: var(--color-black);
}

.ta-archive-links__cat.is-active {
    color: var(--color-black);
    font-weight: var(--font-weight-semibold);
}

/* ---- Content ---- */
.ta-archive-links__content {
    display: flex;
    flex-direction: column;
    grid-column: 1 / -3 !important;
}

a.ta-archive-links__item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    border-top: 1px solid var(--color-black);
    padding: 24px 0;
    text-decoration: none;
    color: var(--color-black);
    transition: color var(--transition-fast);
}

.ta-archive-links__item:hover {
    color: var(--color-primary);
}

.ta-archive-links__item[hidden] {
    display: none;
}

.ta-archive-links__item-title {
    font-family: var(--font-family);
    font-size: var(--font-size-medium);    /* 18px */
    font-weight: var(--font-weight-book);
    line-height: var(--line-height-medium);
}

.ta-archive-links__item-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
}


.ta-faq__question {
    font-family: var(--font-family);
    font-size: var(--font-size-medium);
    font-weight: var(--font-weight-semibold);
    line-height: 1.3333;             /* 32px */
    color: var(--color-black);
    margin: 0;
}

.ta-faq__answer {
    font-family: var(--font-family);
    font-size: var(--font-size-medium); /* 18px — Figma: Suisse Intl Book 18/24 */
    font-weight: var(--font-weight-book);
    line-height: var(--line-height-medium); /* 24px */
    color: var(--color-black);
    margin: 0;
}

@media (max-width: 64rem) {
    .ta-faq details > summary {
        font-size: 1.5rem;
        padding: 1.5rem 1rem;
    }

    .ta-faq__item {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
        padding: 1.5rem 0 1.5rem 0;
    }

    .ta-faq__item:first-child {
        padding-top: 0;
    }

    .ta-faq__question {
        font-size: 1.25rem;
    }
}

@media (max-width: 48rem) {
    .ta-grid .wp-block-details > p {
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 30rem) {
    .ta-faq details > summary {
        font-size: 1.25rem;
        padding: 1rem 0.75rem;
    }
}

@media (max-width: 64rem) {
    .ta-archive-links__sidebar,
    .ta-archive-links__content {
        grid-column: 1 / -1 !important;
    }
}
