.frame--programs > .middle { --right-current: 0px; --center-w: 100vw; --layout-gap-count: 1; }
.programs-page {
    --program-panel: #fff;
    --program-text: #202428;
    --program-muted: #717780;
    --program-border: #e9ebee;
    --program-soft: #f5f7f9;
    --program-accent: #0867bb;
    --program-accent-soft: #edf7ff;
    margin-top: 16px;
    padding: 0 16px;
    color: var(--program-text);
}

.programs-header { padding: 24px; background: var(--program-panel); border-radius: var(--post-block-radius); }
.programs-heading { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.programs-heading-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 48px; height: 48px; border-radius: 12px; color: var(--program-accent); background: #dff1ff; }
.programs-heading-icon svg { width: 28px; height: 28px; }
.programs-heading h1 { font-size: 28px; font-weight: 600; line-height: 1.2; margin: 0 0 8px; }
.programs-heading p { font-size: 15px; line-height: 1.5; color: var(--program-muted); margin: 0; max-width: 520px; }
.programs-search { display: flex; align-items: stretch; gap: 8px; margin-bottom: 24px; }
.programs-search-field { position: relative; flex: 1 1 auto; min-width: 0; }
.programs-search-field svg { position: absolute; left: 13px; top: 12px; width: 20px; height: 20px; color: var(--program-muted); pointer-events: none; }
.programs-search-field input, .programs-search select { width: 100%; height: 44px; border: 0; outline: none; box-shadow: none; border-radius: 8px; background: var(--program-soft); color: var(--program-text); font-size: 14px; }
.programs-search-field input { padding: 10px 12px 10px 42px; }
.programs-search-field input::placeholder { color: var(--program-muted); }
.programs-search select { width: 142px; flex: 0 0 142px; padding: 0 9px; }
.programs-search-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 0 0 180px; padding: 0 18px; border: 0; border-radius: 8px; background: #05a7df; color: #fff; font-size: 14px; }
.programs-search-button svg { flex: 0 0 18px; }
.programs-search-button:hover { background: #008cc2; }
.programs-page :is(a, button):focus-visible { outline: 2px solid var(--program-accent); outline-offset: 3px; }
.programs-search :is(input, select):focus { border: 0 !important; outline: 0 !important; box-shadow: none !important; background: var(--program-accent-soft); }
.programs-categories { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.programs-category-group { position: relative; min-width: 0; }
.programs-category-group summary { display: flex; align-items: center; gap: 8px; min-height: 44px; height: 100%; padding: 10px 12px; border-radius: 8px; background: var(--program-soft); color: var(--program-text); font-size: 14px; line-height: 1.3; cursor: pointer; list-style: none; }
.programs-category-group summary::-webkit-details-marker { display: none; }
.programs-category-group summary > svg { flex: 0 0 20px; width: 20px; height: 20px; color: var(--program-muted); }
.programs-category-group summary > .programs-chevron { flex-basis: 14px; width: 14px; height: 14px; margin-left: auto; }
.programs-category-group[open] summary, .programs-category-group.is-active summary { background: var(--program-accent-soft); color: var(--program-accent); }
.programs-category-group summary:focus-visible { outline: 2px solid var(--program-accent); outline-offset: 3px; }
.programs-category-options { position: absolute; top: calc(100% + 8px); left: 0; width: 280px; max-width: calc(100vw - 32px); padding: 8px; border-radius: 10px; box-shadow: 0 6px 30px rgba(0,0,0,.15); background: var(--program-panel); z-index: 20; }
.programs-category-group:last-child .programs-category-options { left: auto; right: 0; }
.programs-category-options a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; padding: 9px 10px; font-size: 14px; line-height: 1.35; color: var(--program-text); text-decoration: none; border-radius: 6px; }
.programs-category-options a > span:last-child { color: var(--program-muted); font-size: 12px; }
.programs-category-options a:hover, .programs-category-options a[aria-current] { background: var(--program-accent-soft); color: var(--program-accent); }
.programs-results { margin-top: 28px; container-type: inline-size; }
.programs-results-heading, .programs-results-heading > div { display: flex; align-items: center; gap: 10px; }
.programs-results-heading { justify-content: space-between; margin-bottom: 16px; padding: 0 2px; }
.programs-results-heading h2 { font-size: 19px; font-weight: 500; margin: 0; }
.programs-count { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 8px; font-size: 13px; color: var(--program-muted); background: var(--program-panel); }
.programs-free-label { font-size: 13px; color: #33774d; }
.programs-reset { font-size: 13px; text-decoration: none; }
.programs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 16px; }
@container (min-width: 1450px) { .programs-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.program-card { --program-text: #000; --program-muted: var(--program-text); min-width: 0; display: flex; flex-direction: column; padding: 18px; border-radius: var(--post-block-radius); background: var(--program-panel); border: 0; scroll-margin-top: calc(var(--header-h) + 24px); }
.program-card:target { border-color: #8bcaf1; box-shadow: 0 0 0 3px rgba(0, 147, 223, .12); }
.program-card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.program-icon { display: block; width: 48px; height: 48px; object-fit: contain; flex: 0 0 48px; }
.program-card-heading > div { min-width: 0; }
.program-card h3 { font-size: 17px; line-height: 1.3; font-weight: 500; overflow-wrap: anywhere; margin: 0 0 5px; }
.program-card h3 a { color: var(--program-text); text-decoration: none; }
.program-card h3 a:hover { color: var(--program-accent); text-decoration: underline; }
.program-card-category { display: block; font-size: 12px; color: var(--program-muted); }
.program-description { color: var(--program-muted); font-size: 14px; line-height: 1.6; margin: 0 0 18px; flex-grow: 1; }
.program-platforms { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.program-platforms span { font-size: 11px; padding: 3px 7px; border-radius: 5px; background: var(--program-soft); color: var(--program-muted); }
.program-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.program-actions a { display: inline-flex; align-items: center; min-height: 32px; padding: 6px 8px; border: 1px solid var(--program-border); border-radius: 6px; background: var(--program-panel); color: var(--program-muted); font-size: 12px; line-height: 1.2; text-decoration: none; }
.program-actions a:hover { background: var(--program-accent-soft); color: var(--program-accent); }
.program-breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 14px; color: var(--program-muted); margin-bottom: 32px; }
.program-breadcrumbs a { text-decoration: none; }
.program-details-heading { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.program-details-heading img { object-fit: contain; flex: 0 0 80px; }
.program-details h1 { font-size: 32px; font-weight: 600; margin: 0 0 10px; overflow-wrap: anywhere; }
.program-details .program-platforms span { font-size: 13px; padding: 5px 10px; }
.program-details .program-actions a { font-size: 14px; padding: 10px 16px; }
.program-about { max-width: 75ch; margin: 36px 0; }
.program-about h2 { font-size: 22px; font-weight: 500; margin-bottom: 16px; }
.program-about p { font-size: 17px; line-height: 1.8; margin: 0; }
.program-official { padding-top: 24px; border-top: 1px solid var(--program-border); }
.program-official a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 14px; }
.program-official svg { width: 16px; height: 16px; }
.programs-empty { grid-column: 1 / -1; text-align: center; border-radius: var(--post-block-radius); padding: 48px 24px; background: var(--program-panel); }
.programs-empty > svg { width: 36px; height: 36px; color: var(--program-muted); margin-bottom: 16px; }
.programs-empty h3 { font-size: 20px; font-weight: 500; }
.programs-empty p { font-size: 14px; color: var(--program-muted); }
.programs-empty a { font-size: 14px; }

html.dark .programs-page { --program-panel: #20232b; --program-text: #e8ebf0; --program-muted: #a7aebc; --program-border: #383e4c; --program-soft: #292e39; --program-accent: #8bcafa; --program-accent-soft: #263e52; }
html.dark .program-card { --program-text: #e8ebf0; }
html.dark .programs-heading-icon { background: #263e52; }
html.dark .frame--programs .sb-item.is-active { background: #20232b !important; color: #e8ebf0 !important; border-color: #383e4c !important; }
html.dark .programs-search select { color-scheme: dark; }
html.dark .programs-free-label { color: #8ac6a0; }

@media (max-width: 1024px) {
    .programs-page { margin-top: 0; padding: 0; }
    .programs-header { border-radius: 0 0 var(--post-block-radius) var(--post-block-radius); }
    .programs-results { padding: 0 12px; }
}
@media (max-width: 1500px) { .programs-categories { grid-template-columns: repeat(3, minmax(0, 1fr)); } .programs-category-group:nth-child(3n) .programs-category-options { left: auto; right: 0; } }
@media (max-width: 540px) {
    .programs-header { padding: 20px 16px; }
    .programs-heading { gap: 12px; margin-bottom: 20px; }
    .programs-heading h1 { font-size: 25px; }
    .programs-heading p { font-size: 14px; }
    .programs-search { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 8px; }
    .programs-search-field { grid-column: 1 / -1; }
    .programs-search select { min-width: 0; width: 100%; }
    .programs-search-button { min-width: 0; min-height: 44px; }
    .programs-search-field input, .programs-search select { font-size: 16px; }
    .programs-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .programs-category-group summary { gap: 7px; padding: 10px 8px; font-size: 12px; }
    .programs-category-group summary > svg { flex-basis: 18px; width: 18px; height: 18px; }
    .programs-category-group:nth-child(n) .programs-category-options { left: 0; right: auto; }
    .programs-category-group:nth-child(2n) .programs-category-options { left: auto; right: 0; }
    .programs-grid { gap: 12px; }
    .programs-results { margin-top: 24px; }
    .program-card { padding: 20px; }
    .program-details h1 { font-size: 26px; }
}
