/* Parent subpages only. Section content stays in editable WordPress blocks. */
/* Keep explicit block emphasis and labels above headings distinct from body copy. */
body:is(.ncit-page-projects, .ncit-page-council, .ncit-page-join):not(.home):not(.post-name-chiikiokoshi) .entry-body .ncit-section :is(p, li, dd, td, blockquote):not(.has-text-color):not(.ncit-section-subtitle):not(:has(+ h3)) {
    color: var(--ncit-text, #202a35);
    font-weight: 400;
}

body:not(.home):not(.post-name-chiikiokoshi) .site-body-container .entry-body {
    width: 100%;
    max-width: none;
}

.ncit-section {
    --section-ink: var(--wp--preset--color--vk-color-primary, #002387);
    --section-muted: #596b7a;
    --section-line: #dce3ea;
    --section-gap: 32px;
    display: flex;
    flex-direction: column;
    gap: var(--section-gap);
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body:not(.home):not(.post-name-chiikiokoshi) .entry-body > .ncit-section,
.editor-styles-wrapper .ncit-section {
    margin: 0 0 96px;
}

.entry-body .ncit-section > *,
.editor-styles-wrapper .ncit-section > .wp-block-group__inner-container > * {
    width: 100%;
    max-width: none;
    margin: 0;
}

.ncit-section-heading {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.entry-body .ncit-section .ncit-section-heading > *,
.editor-styles-wrapper .ncit-section-heading > .wp-block-group__inner-container > * {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    letter-spacing: 0;
}

.entry-body .ncit-section-heading h2,
.editor-styles-wrapper .ncit-section-heading h2 {
    color: var(--section-ink);
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.5;
}

.ncit-section-heading h2::before,
.ncit-section-heading h2::after {
    display: none;
}

.entry-body .ncit-section-heading p,
.editor-styles-wrapper .ncit-section-heading p {
    color: var(--section-muted);
    font-size: 1rem;
    line-height: 1.85;
}

.entry-body .ncit-section-heading .ncit-section-eyebrow,
.editor-styles-wrapper .ncit-section-heading .ncit-section-eyebrow {
    color: var(--section-ink);
    font-size: .8125rem;
    font-weight: 700;
    line-height: 1.5;
}

.ncit-section-subtitle {
    font-weight: 700;
}

.entry-body .ncit-section .ncit-section-content,
.editor-styles-wrapper .ncit-section .ncit-section-content {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.ncit-section-content > :first-child,
.editor-styles-wrapper .ncit-section-content > .wp-block-group__inner-container > :first-child {
    margin-top: 0;
}

.ncit-section-content > :last-child,
.editor-styles-wrapper .ncit-section-content > .wp-block-group__inner-container > :last-child {
    margin-bottom: 0;
}

.entry-body .ncit-section .ncit-section-content :is(.wp-block-group, .wp-block-columns):first-child {
    margin-top: 0;
}

body:not(.home):not(.post-name-chiikiokoshi) .entry-body .ncit-section-content > .wp-block-group > .wp-block-columns {
    width: 100%;
    max-width: none;
    margin-inline: 0;
}

body:not(.home):not(.post-name-chiikiokoshi) .entry-body .ncit-section-content > .wp-block-group > .wp-block-columns:first-of-type {
    margin-top: 0;
}

.ncit-section .ncit-section-content :is(h3, h4, h5)::after {
    display: none;
}

.ncit-section .ncit-section-contact .wp-block-column {
    padding: 28px;
    border: 1px solid var(--section-line);
    border-radius: 8px;
    background: #fff;
}

.ncit-section .ncit-section-contact :is(h3, h4) {
    margin: 0 0 16px;
    padding: 0;
    border: 0;
    color: var(--section-ink);
    font-size: 1.25rem;
}

.ncit-section .ncit-section-contact p {
    color: var(--section-muted);
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.85;
}

.ncit-section .ncit-section-contact .wp-block-buttons {
    margin-top: 24px;
}

.ncit-section .ncit-section-contact .wp-block-column > :last-child {
    margin-bottom: 0;
}

.ncit-section .ncit-section-contact .wp-block-columns {
    align-items: stretch;
    gap: 24px;
    margin-bottom: 0;
}

.ncit-section .ncit-contact-button {
    width: 360px;
    max-width: 100%;
}

.ncit-section .ncit-contact-button .wp-block-button__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 56px;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
}

.ncit-section .ncit-contact-button .wp-block-button__link:focus-visible {
    outline: 2px solid var(--section-ink);
    outline-offset: 4px;
}

.ncit-section .ncit-council-mission .wp-block-column > .wp-block-group {
    height: 100%;
}

/* Role cards share typography, including cards with an extra editor group. */
:is(body .entry-body, .editor-styles-wrapper) .ncit-section :is(.ncit-council-structure, .ncit-project-governance, .ncit-join-support) .wp-block-group.is-style-vk-group-shadow h3 {
    min-height: 2.9em;
    margin: 0 0 16px;
    padding: 0;
    border: 0;
    color: var(--section-ink);
    font-size: 1.15rem;
    line-height: 1.45;
}

:is(body .entry-body, .editor-styles-wrapper) .ncit-section :is(.ncit-council-structure, .ncit-project-governance, .ncit-join-support) .wp-block-group.is-style-vk-group-shadow h3::after {
    display: none;
}

:is(body .entry-body, .editor-styles-wrapper) .ncit-section :is(.ncit-council-structure, .ncit-project-governance, .ncit-join-support) .wp-block-group.is-style-vk-group-shadow p:last-child {
    margin: 0;
    color: var(--section-muted);
    font-size: .95rem;
    font-weight: 500;
    line-height: 1.75;
}

:is(body .entry-body, .editor-styles-wrapper) .ncit-section :is(.ncit-council-structure, .ncit-project-governance, .ncit-join-support) .wp-block-group.is-style-vk-group-shadow > p:first-child,
.editor-styles-wrapper .ncit-section :is(.ncit-council-structure, .ncit-project-governance, .ncit-join-support) .is-style-vk-group-shadow > .wp-block-group__inner-container > p:first-child {
    margin: 0 0 12px;
    color: var(--section-ink);
    font-size: .8125rem;
    font-weight: 700;
    line-height: 1.5;
}

.ncit-section .ncit-join-support .is-style-vk-group-shadow > .wp-block-group,
.editor-styles-wrapper .ncit-section .ncit-join-support .is-style-vk-group-shadow > .wp-block-group__inner-container > .wp-block-group {
    margin: 0;
    padding: 0;
}

/* Photo cards use the same blocks in the editor and on the public page. */
.ncit-section .ncit-theme-card {
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    border: 1px solid var(--section-line);
    border-radius: 8px;
    background: #fff;
}

.ncit-section .ncit-theme-card > .wp-block-group__inner-container {
    display: contents;
}

:is(.entry-body, .editor-styles-wrapper) .ncit-section .ncit-theme-card figure {
    width: 100%;
    margin: 0;
}

.ncit-section .ncit-theme-card img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0;
}

:is(.entry-body, .editor-styles-wrapper) .ncit-section .ncit-theme-card p {
    margin: 16px 24px 12px;
    color: var(--section-muted);
    font-size: .8125rem;
    font-weight: 700;
    line-height: 1.5;
}

:is(.entry-body, .editor-styles-wrapper) .ncit-section .ncit-theme-card h3 {
    min-height: 2.9em;
    margin: 0 24px;
    padding: 0;
    border: 0;
    color: var(--section-ink);
    font-size: 1.15rem;
    line-height: 1.45;
}

.ncit-section .ncit-theme-card h3::after {
    display: none;
}

:is(.entry-body, .editor-styles-wrapper) .ncit-section .ncit-theme-card p:last-child {
    margin: 12px 24px 24px;
    font-size: .95rem;
    font-weight: 500;
    line-height: 1.75;
}

.editor-styles-wrapper :is(.ncit-section, .ncit-section-heading) > .wp-block-group__inner-container {
    display: contents;
}

.ncit-section .ncit-season-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.ncit-section .ncit-join-school {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px;
}

.ncit-join-school > .wp-block-group__inner-container {
    display: contents;
}

.ncit-section .ncit-join-school .vk_flow {
    position: relative;
    min-width: 0;
    margin: 0;
    padding: 20px;
    border: 1px solid var(--section-line);
    border-radius: 8px;
    background: #fff;
}

.ncit-section .ncit-join-school .vk_flow_frame {
    padding: 0;
    border: 0;
}

.ncit-section .ncit-join-school .vk_flow_frame_text {
    width: 100%;
    margin: 0;
}

.ncit-section .ncit-join-school .vk_flow_frame_text_title {
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    color: var(--section-ink);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
}

.ncit-section .ncit-join-school .vk_flow_frame_text_content {
    color: var(--section-muted);
    font-size: .95rem;
    line-height: 1.75;
}

/* Keep the native Flow arrow and its per-block on/off setting. */
.ncit-section .ncit-join-school .vk_flow-arrow-on::after {
    position: absolute;
    top: 50%;
    right: -20px;
    width: 16px;
    height: 16px;
    margin: 0;
    background-size: 16px 16px;
    transform: translateY(-50%) rotate(-90deg);
}

@media (max-width: 1023px) {
    .ncit-section .ncit-join-school {
        grid-template-columns: 1fr;
    }

    .ncit-section .ncit-join-school .vk_flow-arrow-on::after {
        top: auto;
        right: auto;
        bottom: -20px;
        left: 50%;
        transform: translateX(-50%);
    }
}

.ncit-season-grid > .wp-block-group__inner-container {
    display: contents;
}

:is(.entry-body, .editor-styles-wrapper) .ncit-section .ncit-season-card {
    margin: 0;
    padding: 24px;
    border: 1px solid var(--section-line);
    border-radius: 8px;
    background: #fff;
}

:is(.entry-body, .editor-styles-wrapper) .ncit-section .ncit-season-card h3 {
    margin: 12px 0;
    padding: 0;
    border: 0;
    color: var(--section-ink);
    font-size: 1.15rem;
    line-height: 1.5;
}

:is(.entry-body, .editor-styles-wrapper) .ncit-section .ncit-season-card p {
    margin: 0;
    color: var(--section-muted);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.75;
}

:is(.entry-body, .editor-styles-wrapper) .ncit-section .ncit-season-card .ncit-season-label {
    color: var(--section-ink);
    font-size: .875rem;
    font-weight: 700;
}

.editor-styles-wrapper .ncit-section .ncit-nikko-experience {
    align-items: center !important;
    gap: 32px !important;
}

.editor-styles-wrapper .ncit-nikko-experience img {
    width: 100%;
    height: auto;
}

body.ncit-page-contact:not(.home):not(.post-name-chiikiokoshi) .entry-body > .ncit-contact-form,
body.ncit-page-grant:not(.home):not(.post-name-chiikiokoshi) .entry-body > .wpforms-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 32px;
    border-radius: 8px;
    box-shadow: none;
}

@media (max-width: 781px) {
    .ncit-section .ncit-season-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .ncit-section {
        --section-gap: 24px;
    }

    body:not(.home):not(.post-name-chiikiokoshi) .entry-body > .ncit-section,
    .editor-styles-wrapper .ncit-section {
        margin-bottom: 64px;
    }

    .entry-body .ncit-section-heading h2,
    .editor-styles-wrapper .ncit-section-heading h2 {
        font-size: 1.625rem;
    }

    .ncit-section .ncit-section-contact .wp-block-column {
        padding: 20px;
    }

    body.ncit-page-contact:not(.home):not(.post-name-chiikiokoshi) .entry-body > .ncit-contact-form,
    body.ncit-page-grant:not(.home):not(.post-name-chiikiokoshi) .entry-body > .wpforms-container {
        padding: 20px;
    }
}
