/* Match both current groups and the inner-container emitted by WordPress for older groups. */
:is(.entry-content, .editor-styles-wrapper) :is(.page-jump, .feature-grid, .fact-grid, .legacy-gallery, .step-flow, .step-card, .step-body)::before,
:is(.entry-content, .editor-styles-wrapper) :is(.page-jump, .feature-grid, .fact-grid, .legacy-gallery, .step-flow, .step-card, .step-body)::after { display: none !important; content: none !important; }
:is(.entry-content, .editor-styles-wrapper) :is(.feature-grid, .fact-grid, .step-flow, .step-card, .step-body) > .wp-block-group__inner-container { display: contents !important; }
:is(.entry-content, .editor-styles-wrapper) :is(.page-jump, .feature-grid, .fact-grid, .step-flow, .step-card, .step-body) > *,
:is(.entry-content, .editor-styles-wrapper) :is(.feature-grid, .fact-grid, .step-flow, .step-card, .step-body) > .wp-block-group__inner-container > * { margin-inline: 0 !important; max-width: none; min-width: 0; }
:is(.entry-content, .editor-styles-wrapper) .page-jump { display: block !important; margin: 0 0 34px; padding: 18px 0; background: transparent; border-top: 1px solid var(--ourakai-color-content-line); border-bottom: 1px solid var(--ourakai-color-content-line); border-inline: 0; border-radius: 0; }
:is(.entry-content, .editor-styles-wrapper) .contents-title { margin: 0 0 12px !important; color: var(--ourakai-color-primary); font-size: 16px; font-weight: 700; }
:is(.entry-content, .editor-styles-wrapper) .contents-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; padding-left: 0; margin: 0 !important; list-style: none; }
:is(.entry-content, .editor-styles-wrapper) .contents-list li { padding: 0; margin: 0 !important; }
:is(.entry-content, .editor-styles-wrapper) .contents-list li::marker { color: var(--ourakai-color-submenu-arrow); }
:is(.entry-content, .editor-styles-wrapper) .page-jump a { display: inline; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ourakai-color-primary); font-size: 15px; font-weight: 500; line-height: 1.8; text-decoration: none; text-underline-offset: 4px; }
:is(.entry-content, .editor-styles-wrapper) .page-jump a:hover { color: var(--ourakai-color-link); background: transparent; text-decoration: underline; }
:is(.entry-content, .editor-styles-wrapper) .page-jump a:focus-visible { outline: 2px solid var(--ourakai-color-link); outline-offset: 3px; background: transparent; }
.page-jump-items { display: block; width: 100%; }
.jump-toggle { display: none; }
/* Theme-only fallback for the already published legacy card groups. */
:is(.entry-content, .editor-styles-wrapper) .feature-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
:is(.entry-content, .editor-styles-wrapper) .fact-grid { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
:is(.entry-content, .editor-styles-wrapper) .fact-grid > .wp-block-group__inner-container { padding: 0; min-height: 0; border-radius: 0; background: transparent; }
:is(.entry-content, .editor-styles-wrapper) :is(.fact-grid, .feature-grid) > .wp-block-group__inner-container > .wp-block-group { margin: 0 !important; width: auto; }
:is(.entry-content, .editor-styles-wrapper) .fact-grid > .wp-block-group__inner-container > .wp-block-group { padding: 24px 20px; border-radius: 14px; background: var(--ourakai-color-card); text-align: center; }
:is(.entry-content, .editor-styles-wrapper) .fact-grid :is(.block-label, .block-description) { margin: 0 !important; }
/* Native Columns blocks: the WordPress column count controls the layout. */
:is(.entry-content, .editor-styles-wrapper) .ourakai-cards { display: flex !important; flex-wrap: nowrap; align-items: stretch !important; gap: 18px; margin: 26px 0 38px; }
:is(.entry-content, .editor-styles-wrapper) .ourakai-cards > .wp-block-column { flex: 1 1 0 !important; min-width: 0; margin: 0 !important; }
:is(.entry-content, .editor-styles-wrapper) .ourakai-card { box-sizing: border-box; height: 100%; padding: 24px; border: 1px solid var(--ourakai-color-content-line); border-radius: 14px; background: var(--ourakai-color-card); }
:is(.entry-content, .editor-styles-wrapper) .ourakai-card :is(h3, .block-label) { margin: 0 0 12px !important; color: var(--ourakai-color-primary); font-size: 21px; line-height: 1.5; }
:is(.entry-content, .editor-styles-wrapper) .ourakai-card :is(p, .block-description) { margin: 0 !important; line-height: 1.85; }
:is(.entry-content, .editor-styles-wrapper) .ourakai-card img { width: 100%; height: auto; border-radius: 10px; }
:is(.entry-content, .editor-styles-wrapper) .ourakai-facts .ourakai-card { text-align: center; padding: 28px 16px; }
:is(.entry-content, .editor-styles-wrapper) .ourakai-facts .block-label { font-size: 30px; }
:is(.entry-content, .editor-styles-wrapper) .ourakai-card .block-label strong { font-size: inherit; }
:is(.entry-content, .editor-styles-wrapper) .step-flow { display: grid !important; gap: 16px; margin-block: 24px 38px; }
:is(.entry-content, .editor-styles-wrapper) .step-card { display: grid !important; grid-template-columns: 48px minmax(0, 1fr); gap: 20px; align-items: start; margin: 0 !important; padding: 24px; border: 1px solid var(--ourakai-color-content-line); border-radius: 14px; background: var(--ourakai-color-surface); }
:is(.entry-content, .editor-styles-wrapper) .step-number { display: grid; place-items: center; width: 48px; min-height: 48px; margin: 0 !important; border-radius: 50%; color: var(--ourakai-color-on-accent); background: var(--ourakai-color-link); font-size: 24px; font-weight: 700; line-height: 1; }
.step-number > span { display: none; }
:is(.entry-content, .editor-styles-wrapper) .step-body { min-width: 0; width: auto; margin: 0 !important; }
:is(.entry-content, .editor-styles-wrapper) .step-body h4 { margin: 0 0 10px !important; color: var(--ourakai-color-primary); font-size: 20px; line-height: 1.6; }
:is(.entry-content, .editor-styles-wrapper) .step-body :is(p, .block-description) { margin: 8px 0 !important; line-height: 1.85; }
:is(.entry-content, .editor-styles-wrapper) .step-body > :first-child { margin-top: 0; }
:is(.entry-content, .editor-styles-wrapper) .step-body > :last-child { margin-bottom: 0; }
:is(.entry-content, .editor-styles-wrapper) .ourakai-table { width: 100%; max-width: 100%; overflow-x: auto; }
:is(.entry-content, .editor-styles-wrapper) .ourakai-table table { display: table; table-layout: fixed; width: 100%; white-space: normal; border-collapse: collapse; }
:is(.entry-content, .editor-styles-wrapper) .ourakai-table :is(th, td) { padding: 12px 14px; white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
:is(.entry-content, .editor-styles-wrapper) .ourakai-table thead th { color: var(--green-950); background: var(--mint-100); border-bottom: 2px solid var(--ourakai-color-table-line); }
.ourakai-table-cols-2 tr > :first-child { width: 28%; }
.ourakai-table-cols-3 tr > :first-child { width: 52%; }
.ourakai-table-cols-3 tr > :nth-child(2) { width: 17%; }
.ourakai-table-cols-4 tr > :first-child { width: 20%; }
.ourakai-table-cols-4 tr > :nth-child(2) { width: 43%; }
.ourakai-table-cols-4 tr > :nth-child(3) { width: 12%; }
:is(.entry-content, .editor-styles-wrapper) .ourakai-schedule tr > :first-child { width: 22%; text-align: left; }
:is(.entry-content, .editor-styles-wrapper) .ourakai-schedule tr > :not(:first-child) { width: 13%; text-align: center; }
:is(.entry-content, .editor-styles-wrapper) .ourakai-schedule :is(td, th) { padding: 12px 8px; font-size: 15px; line-height: 1.65; }
.table-scroll-hint { margin: 0 0 8px; color: var(--green-800); font-size: 14px; }
.table-scroll-hint[hidden] { display: none; }
.hero-tagline { font: inherit; }
.footer-guide { display: inline-block; margin-top: 8px; font-size: 14px !important; text-decoration: underline; }
@media (max-width: 780px) {
  .content-shell { padding-block: 40px 65px; }
  .page-header { margin-bottom: 26px; padding: 18px 22px; }
  .entry-content .page-lead { margin-bottom: 24px; font-size: 18px; line-height: 1.9; }
  :is(.entry-content, .editor-styles-wrapper) .page-jump { padding: 12px; margin-bottom: 28px; }
  .page-jump[data-enhanced] > .contents-title { display: none; }
  :is(.entry-content, .editor-styles-wrapper) .contents-list { grid-template-columns: 1fr; gap: 10px; }
  :is(.entry-content, .editor-styles-wrapper) .contents-list a { display: block; min-height: 44px; padding-block: 6px; }
  .jump-toggle { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 44px; padding: 8px 10px; border: 0; background: transparent; color: var(--green-950); font: inherit; font-weight: 700; cursor: pointer; }
  .jump-toggle::after { content: '＋'; }
  .jump-toggle[aria-expanded=true]::after { content: '−'; }
  .page-jump.is-collapsed .page-jump-items { display: none; }
  :is(.entry-content, .editor-styles-wrapper) .ourakai-cards { flex-direction: column; }
  :is(.entry-content, .editor-styles-wrapper) .ourakai-card { padding: 22px; }
  :is(.entry-content, .editor-styles-wrapper) .feature-grid { grid-template-columns: 1fr; }
  :is(.entry-content, .editor-styles-wrapper) .fact-grid { grid-template-columns: 1fr; }
  :is(.entry-content, .editor-styles-wrapper) .step-card { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 18px 14px; }
  :is(.entry-content, .editor-styles-wrapper) .step-number { width: 36px; min-height: 36px; font-size: 20px; }
  :is(.entry-content, .editor-styles-wrapper) .step-body h4 { font-size: 18px; }
  :is(.entry-content, .editor-styles-wrapper) .ourakai-table :is(th, td) { padding: 10px 8px; font-size: 14px; line-height: 1.8; }
  :is(.entry-content, .editor-styles-wrapper) .ourakai-schedule table { min-width: 720px; }
  :is(.entry-content, .editor-styles-wrapper) .ourakai-schedule { border-right: 3px solid var(--ourakai-color-table-line); }
  .hero { height: auto; display: flex; flex-direction: column; padding-bottom: 28px; }
  .hero::after { display: none; }
  .hero > img { height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: center; }
  .hero-copy { position: static; inset: auto; justify-content: flex-start; padding-block: 20px 26px; }
  .hero h1 { font-size: clamp(29px, 8vw, 38px); line-height: 1.45; text-shadow: none; }
  .hero-tagline { text-wrap: balance; }
  .hero h1 span { margin-top: 10px; font-size: .56em; }
  .quick-section { margin-top: -24px; }
}
@media print { .jump-toggle, .table-scroll-hint { display: none; } .page-jump.is-collapsed .page-jump-items { display: flex; } }

@media (min-width: 781px) and (max-width: 1100px) { :is(.entry-content, .editor-styles-wrapper) .ourakai-cards:has(> .wp-block-column:nth-child(4)) { flex-wrap: wrap; } :is(.entry-content, .editor-styles-wrapper) .ourakai-cards:has(> .wp-block-column:nth-child(4)) > .wp-block-column { flex-basis: calc(50% - 9px) !important; } }

:is(.entry-content, .editor-styles-wrapper) .contents-list a::before { content: "↓"; margin-right: 8px; color: var(--ourakai-color-submenu-arrow); }
