*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --ybed-bg: #f7fafc;
    --ybed-surface: #ffffff;
    --ybed-surface-2: #eef6fb;
    --ybed-ink: #122033;
    --ybed-muted: #64748b;
    --ybed-line: #dbe7ef;
    --ybed-blue: #2493d1;
    --ybed-blue-dark: #126da5;
    --ybed-teal: #13a79e;
    --ybed-amber: #f0a52b;
    --ybed-coral: #e85d3f;
    --ybed-violet: #7b3bd7;
    --ybed-shadow: 0 18px 45px rgba(18, 32, 51, 0.1);
    --ybed-radius: 8px;
    --ybed-header-height: 78px;
    --ybed-font: Tahoma, Arial, "Segoe UI", sans-serif;
}

html {
    scroll-behavior: smooth;
}

body.ybed-page {
    margin: 0;
    background: var(--ybed-bg);
    color: var(--ybed-ink);
    direction: rtl;
    font-family: var(--ybed-font);
    line-height: 1.8;
    text-rendering: optimizeLegibility;
}

body.ybed-page a {
    color: inherit;
    text-decoration: none;
}

body.ybed-page img {
    max-width: 100%;
    height: auto;
}

body.ybed-page svg {
    width: 1.15em;
    height: 1.15em;
    display: inline-block;
    vertical-align: middle;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ybed-container {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.ybed-site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: var(--ybed-header-height);
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(219, 231, 239, 0.9);
    backdrop-filter: blur(18px);
}

body.admin-bar .ybed-site-header {
    top: 32px;
}

.ybed-header-inner {
    min-height: var(--ybed-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.ybed-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.ybed-brand-logo img {
    max-height: 56px;
    width: auto;
}

.ybed-brand-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #fff;
    background: linear-gradient(135deg, var(--ybed-blue), var(--ybed-teal));
    border-radius: 8px;
    font-weight: 900;
}

.ybed-brand-text {
    display: grid;
    gap: 0;
}

.ybed-brand-text strong {
    font-size: 1.28rem;
    line-height: 1.1;
}

.ybed-brand-text small {
    color: var(--ybed-amber);
    font-weight: 800;
}

.ybed-nav {
    flex: 1;
    min-width: 0;
}

.ybed-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ybed-nav-list li {
    position: relative;
}

.ybed-nav-list a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 14px;
    border-radius: 8px;
    color: #1f2b3d;
    font-size: var(--ybed-main-menu-font-size, 18px);
    font-weight: 800;
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.ybed-nav-list a:hover,
.ybed-nav-list a:focus-visible {
    color: var(--ybed-blue-dark);
    background: #edf7fc;
    transform: translateY(-1px);
}

.ybed-nav-list .sub-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 60;
    min-width: 230px;
    display: grid;
    gap: 4px;
    padding: 8px;
    margin: 0;
    list-style: none;
    border: 1px solid var(--ybed-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--ybed-shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.ybed-nav-list li:hover > .sub-menu,
.ybed-nav-list li:focus-within > .sub-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.ybed-nav-list .sub-menu a {
    width: 100%;
    justify-content: flex-start;
}

.ybed-header-search {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--ybed-line);
    border-radius: 8px;
    background: var(--ybed-surface);
    color: var(--ybed-blue-dark);
    cursor: pointer;
    font-family: var(--ybed-font);
}

.ybed-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: start center;
    padding: clamp(86px, 12vh, 140px) 18px 24px;
    background: rgba(18, 32, 51, 0.48);
    backdrop-filter: blur(10px);
}

.ybed-search-overlay[hidden] {
    display: none;
}

html.ybed-search-open {
    overflow: hidden;
}

.ybed-search-dialog {
    position: relative;
    width: min(760px, 100%);
    padding: 26px;
    border: 1px solid rgba(219, 231, 239, 0.9);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 26px 70px rgba(18, 32, 51, 0.25);
}

.ybed-search-dialog h2 {
    margin: 14px 0 18px;
    font-size: clamp(1.35rem, 3vw, 2.2rem);
    line-height: 1.35;
    letter-spacing: 0;
}

.ybed-search-close {
    position: absolute;
    top: 14px;
    left: 14px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--ybed-line);
    border-radius: 8px;
    background: #f8fbfd;
    color: var(--ybed-ink);
    cursor: pointer;
}

.ybed-overlay-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--ybed-line);
    border-radius: 8px;
    background: #f8fbfd;
}

.ybed-overlay-search input {
    min-width: 0;
    height: 56px;
    padding: 0 16px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ybed-ink);
    font-family: var(--ybed-font);
    font-size: 1.02rem;
    font-weight: 800;
}

.ybed-overlay-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
    padding: 0 22px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--ybed-blue), var(--ybed-blue-dark));
    font-family: var(--ybed-font);
    font-weight: 900;
    cursor: pointer;
}

.ybed-main {
    min-height: 68vh;
}

.ybed-hero {
    position: relative;
    overflow: hidden;
    background-image:
        linear-gradient(90deg, rgba(247, 250, 252, 0.2), rgba(247, 250, 252, 0.97) 46%, rgba(247, 250, 252, 1) 72%),
        var(--ybed-hero-image);
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--ybed-line);
}

.ybed-hero-inner {
    min-height: clamp(500px, 68vh, 720px);
    display: grid;
    grid-template-columns: minmax(0, 620px) minmax(220px, 320px);
    align-items: center;
    justify-content: space-between;
    gap: 38px;
    padding-block: 72px;
}

.ybed-hero-copy {
    max-width: 640px;
}

.ybed-kicker,
.ybed-section-heading > span,
.ybed-band-title > span {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 32px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(19, 167, 158, 0.12);
    color: #0f7c76;
    font-size: 0.86rem;
    font-weight: 900;
}

.ybed-hero h1 {
    max-width: 700px;
    margin: 18px 0 14px;
    font-size: clamp(2.1rem, 4.8vw, 4.6rem);
    line-height: 1.16;
    letter-spacing: 0;
}

.ybed-hero p {
    max-width: 620px;
    margin: 0 0 24px;
    color: #334155;
    font-size: 1.1rem;
    font-weight: 600;
}

.ybed-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    width: min(640px, 100%);
    padding: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--ybed-line);
    border-radius: 8px;
    box-shadow: var(--ybed-shadow);
}

.ybed-search input {
    min-width: 0;
    height: 52px;
    padding: 0 16px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ybed-ink);
    font-family: var(--ybed-font);
    font-size: 1rem;
    font-weight: 700;
}

.ybed-search button,
.ybed-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    padding: 0 20px;
    border: 0;
    border-radius: 8px;
    font-family: var(--ybed-font);
    font-size: 0.98rem;
    font-weight: 900;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.ybed-search button,
.ybed-button-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--ybed-blue), var(--ybed-blue-dark));
    box-shadow: 0 14px 26px rgba(36, 147, 209, 0.23);
}

.ybed-button-soft {
    color: #874a00;
    background: #fff3dd;
    border: 1px solid #f7d394;
}

.ybed-button-teal {
    color: #fff;
    background: linear-gradient(135deg, var(--ybed-teal), #087c76);
    box-shadow: 0 14px 26px rgba(19, 167, 158, 0.22);
}

.ybed-button-amber {
    color: #332100;
    background: linear-gradient(135deg, #ffd15a, var(--ybed-amber));
    box-shadow: 0 14px 26px rgba(240, 165, 43, 0.22);
}

.ybed-button-coral {
    color: #fff;
    background: linear-gradient(135deg, var(--ybed-coral), #c83d25);
    box-shadow: 0 14px 26px rgba(232, 93, 63, 0.22);
}

.ybed-button-violet {
    color: #fff;
    background: linear-gradient(135deg, var(--ybed-violet), #5220a5);
    box-shadow: 0 14px 26px rgba(123, 59, 215, 0.22);
}

.ybed-button-dark {
    color: #fff;
    background: linear-gradient(135deg, #1f2b3d, #122033);
    box-shadow: 0 14px 26px rgba(18, 32, 51, 0.22);
}

.ybed-hero-actions .ybed-button {
    color: var(--ybed-button-text-color, currentColor);
}

.ybed-button .folder-back {
    fill: #f4b400;
    stroke: none;
}

.ybed-button .folder-paper {
    fill: #fff;
    stroke: none;
}

.ybed-button .folder-front {
    fill: #ffcc00;
    stroke: none;
}

.ybed-search button:hover,
.ybed-button:hover,
.ybed-search button:focus-visible,
.ybed-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(18, 32, 51, 0.14);
}

.ybed-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.ybed-hero-panel {
    align-self: end;
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(219, 231, 239, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--ybed-shadow);
    backdrop-filter: blur(12px);
}

.ybed-hero-panel div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    border-radius: 8px;
    background: #f8fbfd;
}

.ybed-hero-panel strong {
    color: var(--ybed-blue-dark);
    font-size: 1.8rem;
    line-height: 1;
}

.ybed-hero-panel span {
    color: var(--ybed-muted);
    font-weight: 800;
}

.ybed-section {
    padding-block: 62px;
}

.ybed-section-clear {
    background: var(--ybed-surface);
}

.ybed-section-muted {
    background: #eef5f9;
}

.ybed-section-heading,
.ybed-band-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.ybed-section-heading h2,
.ybed-band-title h2 {
    order: 1;
    text-align: right;
}

.ybed-section-heading > span,
.ybed-band-title > span {
    order: 2;
    margin-inline-start: auto;
}

.ybed-section-heading h2,
.ybed-band-title h2 {
    margin: 0;
    color: var(--ybed-ink);
    font-size: clamp(1.55rem, 3vw, 2.5rem);
    line-height: 1.25;
    letter-spacing: 0;
}

.ybed-band-title {
    align-items: center;
    padding: 18px 20px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--ybed-blue), var(--ybed-teal));
}

.ybed-band-title h2 {
    color: #fff;
}

.ybed-band-title span {
    color: #e7fbff;
    background: rgba(255, 255, 255, 0.14);
}

.ybed-level-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.ybed-level-card,
.ybed-tree-card {
    min-width: 0;
    border-radius: 8px;
    background: var(--ybed-surface);
    border: 1px solid var(--ybed-line);
    box-shadow: 0 14px 34px rgba(18, 32, 51, 0.08);
    overflow: hidden;
}

.ybed-level-card {
    padding: 22px;
    position: relative;
}

.ybed-level-card::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 6px;
    background: var(--ybed-blue);
}

.ybed-level-card-violet::before {
    background: var(--ybed-violet);
}

.ybed-level-card-warm::before {
    background: var(--ybed-coral);
}

.ybed-level-card-teal::before {
    background: var(--ybed-teal);
}

.ybed-level-head {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ybed-muted);
    font-weight: 900;
}

.ybed-level-head > span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    color: var(--ybed-blue-dark);
    background: #e6f5fb;
}

.ybed-level-card-violet .ybed-level-head > span {
    color: #5d26ac;
    background: #f0e9ff;
}

.ybed-level-card-warm .ybed-level-head > span {
    color: #b43b22;
    background: #fff0e9;
}

.ybed-level-card-teal .ybed-level-head > span {
    color: #087c76;
    background: #e4f8f5;
}

.ybed-level-head p,
.ybed-level-card h3 {
    margin: 0;
}

.ybed-level-card h3 {
    margin-top: 14px;
    font-size: 1.55rem;
    line-height: 1.35;
}

.ybed-level-links,
.ybed-tree-children {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.ybed-level-links a,
.ybed-level-links .ybed-muted-pill,
.ybed-tree-children a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--ybed-surface-2);
    color: var(--ybed-ink);
    font-weight: 900;
    transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.ybed-level-links a:hover,
.ybed-level-links a:focus-visible,
.ybed-tree-children a:hover,
.ybed-tree-children a:focus-visible {
    color: var(--ybed-blue-dark);
    background: #ddf1fa;
    transform: translateX(-3px);
}

.ybed-level-links small,
.ybed-tree-children small {
    display: grid;
    place-items: center;
    min-width: 30px;
    height: 26px;
    padding-inline: 8px;
    border-radius: 999px;
    color: #fff;
    background: var(--ybed-blue);
    font-size: 0.76rem;
}

.ybed-muted-pill {
    color: var(--ybed-muted);
    opacity: 0.7;
}

.ybed-subject-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ybed-subject-tile {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 14px;
    border: 1px solid var(--ybed-line);
    border-radius: 8px;
    background: var(--ybed-surface);
    box-shadow: 0 10px 24px rgba(18, 32, 51, 0.05);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.ybed-subject-tile:hover,
.ybed-subject-tile:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(36, 147, 209, 0.45);
    box-shadow: 0 18px 36px rgba(18, 32, 51, 0.11);
}

.ybed-subject-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: #c98600;
    background: #fff8df;
    border-radius: 8px;
}

.ybed-subject-folder svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: none;
}

.ybed-subject-folder .folder-back {
    fill: #f4b400;
}

.ybed-subject-folder .folder-paper {
    fill: #ffffff;
    opacity: 0.92;
}

.ybed-subject-folder .folder-front {
    fill: #ffcc00;
}

.ybed-subject-name {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--ybed-ink);
    font-size: 1.05rem;
    font-weight: 900;
}

.ybed-subject-count {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 30px;
    padding-inline: 8px;
    border-radius: 999px;
    color: #875200;
    background: #fff2d8;
    font-size: 0.82rem;
    font-weight: 900;
}

.ybed-tree-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.ybed-tree-card {
    padding: 18px;
}

.ybed-tree-parent {
    display: block;
    color: var(--ybed-ink);
    font-size: 1.18rem;
    font-weight: 900;
}

.ybed-archive-hero {
    background:
        linear-gradient(135deg, rgba(18, 109, 165, 0.94), rgba(19, 167, 158, 0.88)),
        var(--ybed-hero-image);
    background-size: cover;
    background-position: center;
    color: #fff;
    padding-block: 74px 54px;
}

.ybed-archive-hero h1 {
    max-width: 900px;
    margin: 18px 0 0;
    font-size: clamp(2rem, 4.2vw, 4rem);
    line-height: 1.2;
    letter-spacing: 0;
}

.ybed-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.92rem;
    font-weight: 800;
}

.ybed-breadcrumb a {
    color: #fff;
}

.ybed-archive-description {
    max-width: 780px;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.02rem;
}

.ybed-content-shell,
.ybed-article-inner {
    max-width: 920px;
}

.ybed-list-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.ybed-list-head span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--ybed-blue-dark);
    background: #e6f5fb;
    border-radius: 8px;
}

.ybed-list-head h2 {
    margin: 0;
    font-size: 1.45rem;
}

.ybed-lesson-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: lessons;
}

.ybed-lesson-list li {
    margin: 0;
    padding: 0;
}

.ybed-lesson-list a {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 12px;
    min-height: 70px;
    padding: 12px;
    border: 1px solid var(--ybed-line);
    border-radius: 8px;
    background: var(--ybed-surface);
    box-shadow: 0 10px 24px rgba(18, 32, 51, 0.04);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.ybed-lesson-list a:hover,
.ybed-lesson-list a:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(36, 147, 209, 0.42);
    box-shadow: 0 16px 32px rgba(18, 32, 51, 0.1);
}

.ybed-lesson-number {
    display: grid;
    place-items: center;
    width: 48px;
    height: 46px;
    border-radius: 8px;
    color: #fff;
    background: var(--ybed-blue);
    font-weight: 900;
}

.ybed-lesson-title {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--ybed-ink);
    font-size: 1.05rem;
    font-weight: 900;
}

.ybed-lesson-arrow {
    color: var(--ybed-teal);
}

.ybed-pagination {
    margin-top: 24px;
}

.ybed-pagination ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.ybed-pagination a,
.ybed-pagination span {
    display: grid;
    place-items: center;
    min-width: 42px;
    min-height: 42px;
    padding: 6px 12px;
    border: 1px solid var(--ybed-line);
    border-radius: 8px;
    background: var(--ybed-surface);
    font-weight: 900;
}

.ybed-pagination .current {
    color: #fff;
    background: var(--ybed-blue);
    border-color: var(--ybed-blue);
}

.ybed-empty-state {
    padding: 34px;
    border: 1px solid var(--ybed-line);
    border-radius: 8px;
    background: var(--ybed-surface);
    text-align: center;
}

.ybed-empty-state h2 {
    margin: 0 0 8px;
}

.ybed-empty-state p {
    margin: 0 0 18px;
    color: var(--ybed-muted);
}

.ybed-article {
    padding-block: 62px;
}

.ybed-article .ybed-breadcrumb {
    color: var(--ybed-muted);
    margin-bottom: 22px;
}

.ybed-article .ybed-breadcrumb a {
    color: var(--ybed-blue-dark);
}

.ybed-article-header {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--ybed-line);
}

.ybed-article-category {
    display: inline-flex;
    width: fit-content;
    min-height: 32px;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    color: #0f7c76;
    background: rgba(19, 167, 158, 0.12);
    font-weight: 900;
}

.ybed-article-header h1 {
    margin: 16px 0 0;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.25;
    letter-spacing: 0;
}

.ybed-article-content {
    margin-top: 28px;
    padding: 28px;
    border: 1px solid var(--ybed-line);
    border-radius: 8px;
    background: var(--ybed-surface);
    box-shadow: 0 14px 34px rgba(18, 32, 51, 0.06);
    color: #1f2937;
    font-size: var(--ybed-article-font-size, 18px);
}

.ybed-article-content h2,
.ybed-article-content h3,
.ybed-article-content h4,
.ybed-article-content h5,
.ybed-article-content h6 {
    margin: 1.35em 0 0.55em;
    color: var(--ybed-ink);
    line-height: 1.35;
    letter-spacing: 0;
}

.ybed-article-content h2 {
    font-size: var(--ybed-article-h2-font-size, 30px);
}

.ybed-article-content h3 {
    font-size: var(--ybed-article-h3-font-size, 26px);
}

.ybed-article-content h4 {
    font-size: var(--ybed-article-h4-font-size, 22px);
}

.ybed-article-content h5 {
    font-size: var(--ybed-article-h5-font-size, 20px);
}

.ybed-article-content h6 {
    font-size: var(--ybed-article-h6-font-size, 18px);
}

.ybed-article-content a {
    color: var(--ybed-blue-dark);
    font-weight: 800;
}

.ybed-toc {
    margin: 0 0 28px;
    padding: 18px;
    border: 1px solid #cfe4ef;
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fcff, #eef7fb);
}

.ybed-toc-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--ybed-ink);
}

.ybed-toc-head span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--ybed-blue), var(--ybed-teal));
}

.ybed-toc-head strong {
    font-size: 1.12rem;
    font-weight: 900;
}

.ybed-toc-list {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ybed-toc-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.ybed-toc-toggle,
.ybed-toc-toggle-spacer {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

.ybed-toc-toggle {
    border: 1px solid #cfe4ef;
    color: var(--ybed-blue-dark);
    background: #fff;
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.ybed-toc-toggle[aria-expanded="true"] {
    color: #fff;
    background: var(--ybed-blue);
}

.ybed-toc-toggle[aria-expanded="true"] svg {
    transform: rotate(-90deg);
}

.ybed-toc-toggle svg {
    transition: transform 180ms ease;
}

.ybed-toc-list a,
.ybed-toc-children a {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 7px 10px;
    border-radius: 8px;
    color: #1f2b3d;
    background: rgba(255, 255, 255, 0.72);
    font-weight: 900;
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.ybed-toc-list a:hover,
.ybed-toc-list a:focus-visible,
.ybed-toc-children a:hover,
.ybed-toc-children a:focus-visible {
    color: var(--ybed-blue-dark);
    background: #fff;
    transform: translateX(-3px);
}

.ybed-toc-children {
    display: grid;
    gap: 6px;
    margin: 7px 42px 4px 0;
    padding: 0;
    list-style: none;
}

.ybed-toc-children[hidden] {
    display: none;
}

.ybed-toc-level-2 > .ybed-toc-row > a {
    border: 1px solid rgba(36, 147, 209, 0.22);
    background: linear-gradient(135deg, rgba(230, 245, 251, 0.98), rgba(255, 255, 255, 0.88));
    color: #0f4364;
}

.ybed-toc-level-3 > a {
    border: 1px solid rgba(19, 167, 158, 0.2);
    background: linear-gradient(135deg, rgba(228, 248, 245, 0.96), rgba(255, 255, 255, 0.86));
    color: #075f5a;
}

.ybed-toc-level-4 > a {
    border: 1px solid rgba(240, 165, 43, 0.26);
    background: linear-gradient(135deg, rgba(255, 248, 223, 0.98), rgba(255, 255, 255, 0.86));
    color: #704700;
}

.ybed-toc-level-5 > a {
    border: 1px solid rgba(123, 59, 215, 0.2);
    background: linear-gradient(135deg, rgba(240, 233, 255, 0.96), rgba(255, 255, 255, 0.86));
    color: #4b1b91;
}

.ybed-toc-level-6 > a {
    border: 1px solid rgba(232, 93, 63, 0.2);
    background: linear-gradient(135deg, rgba(255, 240, 233, 0.96), rgba(255, 255, 255, 0.86));
    color: #8d2d1a;
}

.ybed-toc-level-2 > .ybed-toc-row > a::before,
.ybed-toc-level-3 > a::before,
.ybed-toc-level-4 > a::before,
.ybed-toc-level-5 > a::before,
.ybed-toc-level-6 > a::before {
    flex: 0 0 auto;
    min-width: 34px;
    margin-inline-end: 8px;
    padding: 2px 7px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.4;
    text-align: center;
}

.ybed-toc-level-2 > .ybed-toc-row > a::before {
    content: "H2";
    background: var(--ybed-blue);
}

.ybed-toc-level-3 > a::before {
    content: "H3";
    background: var(--ybed-teal);
}

.ybed-toc-level-4 > a::before {
    content: "H4";
    background: var(--ybed-amber);
}

.ybed-toc-level-5 > a::before {
    content: "H5";
    background: var(--ybed-violet);
}

.ybed-toc-level-6 > a::before {
    content: "H6";
    background: var(--ybed-coral);
}

.ybed-toc-level-2 a {
    border-inline-start: 4px solid var(--ybed-blue);
    font-size: 1rem;
}

.ybed-toc-level-3 {
    margin-inline-start: 16px;
}

.ybed-toc-level-3 a {
    border-inline-start: 3px solid var(--ybed-teal);
    font-size: 0.95rem;
    font-weight: 800;
}

.ybed-toc-level-4 {
    margin-inline-start: 30px;
}

.ybed-toc-level-4 a {
    border-inline-start: 3px solid #8abbd4;
    font-size: 0.9rem;
    font-weight: 800;
}

.ybed-toc-level-5 {
    margin-inline-start: 42px;
}

.ybed-toc-level-5 a {
    border-inline-start: 2px solid var(--ybed-amber);
    font-size: 0.86rem;
    font-weight: 700;
}

.ybed-toc-level-6 {
    margin-inline-start: 54px;
}

.ybed-toc-level-6 a {
    border-inline-start: 2px solid var(--ybed-coral);
    font-size: 0.84rem;
    font-weight: 700;
}

.ybed-next-article,
.ybed-comments-box {
    margin-top: 24px;
    padding: 22px;
    border: 1px solid var(--ybed-line);
    border-radius: 8px;
    background: var(--ybed-surface);
    box-shadow: 0 14px 34px rgba(18, 32, 51, 0.06);
}

.ybed-next-kicker {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 4px 12px;
    border-radius: 999px;
    color: #875200;
    background: #fff2d8;
    font-size: 0.86rem;
    font-weight: 900;
}

.ybed-next-article a {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 8px;
    color: var(--ybed-ink);
    background: linear-gradient(135deg, #f8fcff, #eef7fb);
    border: 1px solid #cfe4ef;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.ybed-next-article a:hover,
.ybed-next-article a:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(18, 32, 51, 0.1);
}

.ybed-next-article strong {
    font-size: 1.25rem;
    line-height: 1.45;
}

.ybed-next-article small {
    color: var(--ybed-muted);
    font-size: 0.95rem;
    font-weight: 700;
}

.ybed-next-article a > span:last-child {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    color: var(--ybed-blue-dark);
    font-weight: 900;
}

.ybed-comments-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.ybed-comments-head > span {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--ybed-blue), var(--ybed-teal));
}

.ybed-comments-head h2,
.ybed-comments-head p {
    margin: 0;
}

.ybed-comments-head h2 {
    font-size: 1.35rem;
}

.ybed-comments-head p {
    color: var(--ybed-muted);
    font-weight: 700;
}

.ybed-comments-list {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.ybed-comments-list li {
    padding: 14px;
    border: 1px solid #d9e8f0;
    border-radius: 8px;
    background: #f8fbfd;
}

.ybed-comments-list strong {
    color: var(--ybed-ink);
    font-weight: 900;
}

.ybed-comments-list time {
    display: inline-flex;
    margin-inline-start: 8px;
    color: var(--ybed-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.ybed-comments-list p {
    margin: 8px 0 0;
}

.ybed-comment-grid {
    display: grid;
    gap: 12px;
}

.ybed-comment-form label {
    display: grid;
    gap: 7px;
    color: var(--ybed-ink);
    font-weight: 900;
}

.ybed-comment-form input,
.ybed-comment-form textarea {
    width: 100%;
    border: 1px solid #cfe0e9;
    border-radius: 8px;
    outline: 0;
    background: #fff;
    color: var(--ybed-ink);
    font-family: var(--ybed-font);
    font-size: 1rem;
    font-weight: 700;
}

.ybed-comment-form input {
    height: 50px;
    padding: 0 14px;
}

.ybed-comment-form textarea {
    min-height: 140px;
    padding: 12px 14px;
    resize: vertical;
}

.ybed-comment-form input:focus,
.ybed-comment-form textarea:focus {
    border-color: rgba(36, 147, 209, 0.65);
    box-shadow: 0 0 0 3px rgba(36, 147, 209, 0.12);
}

.ybed-comment-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    margin-top: 12px;
    padding: 0 22px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--ybed-blue), var(--ybed-blue-dark));
    font-family: var(--ybed-font);
    font-weight: 900;
    cursor: pointer;
}

.ybed-comment-login {
    margin: 0;
    padding: 14px;
    border-radius: 8px;
    background: #fff8df;
    color: #875200;
    font-weight: 800;
}

.ybed-search {
    position: relative;
    gap: 12px;
    padding: 10px;
    border: 1px solid rgba(184, 214, 230, 0.95);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 251, 254, 0.9)),
        radial-gradient(circle at 14% 15%, rgba(240, 165, 43, 0.13), transparent 34%);
    box-shadow: 0 22px 55px rgba(18, 32, 51, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.ybed-search::before {
    content: "";
    position: absolute;
    inset: 7px;
    z-index: 0;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 8px;
    pointer-events: none;
}

.ybed-search input,
.ybed-search button {
    position: relative;
    z-index: 1;
}

.ybed-search input {
    height: 58px;
    border: 1px solid rgba(207, 224, 233, 0.95);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.ybed-search input:focus {
    border-color: rgba(240, 165, 43, 0.85);
    box-shadow: 0 0 0 4px rgba(240, 165, 43, 0.14);
}

.ybed-search button {
    min-height: 58px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: linear-gradient(135deg, #2299d5, #0f6d9f);
    box-shadow: 0 16px 30px rgba(15, 109, 159, 0.26);
}

.ybed-search-overlay {
    background:
        radial-gradient(circle at 22% 12%, rgba(240, 165, 43, 0.22), transparent 28%),
        radial-gradient(circle at 80% 24%, rgba(19, 167, 158, 0.18), transparent 32%),
        rgba(18, 32, 51, 0.56);
    backdrop-filter: blur(18px);
}

.ybed-search-dialog {
    width: min(900px, 100%);
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.95)),
        radial-gradient(circle at top right, rgba(240, 165, 43, 0.14), transparent 34%);
    box-shadow: 0 34px 95px rgba(6, 22, 38, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.ybed-search-dialog::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(219, 190, 129, 0.32);
    border-radius: 8px;
    pointer-events: none;
}

.ybed-search-dialog h2 {
    max-width: 760px;
    font-size: clamp(1.8rem, 4vw, 3rem);
}

.ybed-search-close {
    border-color: rgba(207, 224, 233, 0.9);
    background: linear-gradient(180deg, #fff, #f4f8fb);
    box-shadow: 0 10px 22px rgba(18, 32, 51, 0.08);
}

.ybed-overlay-search {
    position: relative;
    padding: 10px;
    border-color: rgba(184, 214, 230, 0.95);
    background: linear-gradient(135deg, rgba(248, 252, 255, 0.96), rgba(255, 255, 255, 0.92));
    box-shadow: 0 16px 38px rgba(18, 32, 51, 0.08);
}

.ybed-overlay-search input {
    height: 60px;
    border: 1px solid rgba(207, 224, 233, 0.95);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
}

.ybed-overlay-search input:focus {
    box-shadow: 0 0 0 4px rgba(36, 147, 209, 0.13);
}

.ybed-overlay-search button {
    min-height: 60px;
    background: linear-gradient(135deg, #2299d5, #0f6d9f);
    box-shadow: 0 16px 28px rgba(15, 109, 159, 0.24);
}

.ybed-comments-box {
    position: relative;
    overflow: hidden;
    border-color: rgba(199, 222, 234, 0.95);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.96)),
        radial-gradient(circle at top left, rgba(240, 165, 43, 0.1), transparent 32%);
    box-shadow: 0 24px 60px rgba(18, 32, 51, 0.09);
}

.ybed-comments-box::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(219, 190, 129, 0.24);
    border-radius: 8px;
    pointer-events: none;
}

.ybed-comments-box > * {
    position: relative;
    z-index: 1;
}

.ybed-comments-head > span {
    background: linear-gradient(135deg, #122033, var(--ybed-blue));
    box-shadow: 0 12px 24px rgba(18, 32, 51, 0.18);
}

.ybed-comment-form input,
.ybed-comment-form textarea {
    border-color: rgba(199, 222, 234, 0.95);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.ybed-comment-form button {
    background: linear-gradient(135deg, #122033, #0f6d9f);
    box-shadow: 0 16px 32px rgba(18, 32, 51, 0.18);
}

.ybed-error-page {
    min-height: 72vh;
    display: grid;
    align-items: center;
    padding-block: 72px;
    background:
        linear-gradient(135deg, rgba(248, 252, 255, 0.96), rgba(239, 247, 251, 0.94)),
        var(--ybed-hero-image);
    background-size: cover;
    background-position: center;
}

.ybed-error-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
    gap: 32px;
    align-items: center;
}

.ybed-error-copy {
    max-width: 720px;
}

.ybed-error-code {
    display: inline-flex;
    margin-bottom: 14px;
    color: rgba(18, 32, 51, 0.11);
    font-size: clamp(5rem, 15vw, 11rem);
    font-weight: 900;
    line-height: 0.8;
}

.ybed-error-copy h1 {
    margin: 16px 0 12px;
    font-size: clamp(2rem, 5vw, 4.2rem);
    line-height: 1.16;
}

.ybed-error-copy p {
    max-width: 640px;
    margin: 0 0 22px;
    color: #334155;
    font-size: 1.08rem;
    font-weight: 700;
}

.ybed-error-search {
    width: min(680px, 100%);
}

.ybed-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.ybed-error-card {
    display: grid;
    gap: 10px;
    place-items: center;
    min-height: 330px;
    padding: 28px;
    border: 1px solid rgba(219, 190, 129, 0.34);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(247, 252, 255, 0.82)),
        radial-gradient(circle at top, rgba(240, 165, 43, 0.22), transparent 42%);
    box-shadow: 0 32px 80px rgba(18, 32, 51, 0.16);
}

.ybed-error-card span {
    color: #d59b35;
    font-size: clamp(3.5rem, 9vw, 6.5rem);
    font-weight: 900;
    line-height: 1;
}

.ybed-error-card strong {
    color: var(--ybed-ink);
    font-size: 1.5rem;
}

.ybed-error-card small {
    color: var(--ybed-muted);
    font-weight: 900;
}

.ybed-site-footer {
    color: #dbeafe;
    background: #122033;
}

.ybed-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 92px;
}

.ybed-footer-inner p {
    margin: 0;
    font-size: var(--ybed-footer-copyright-font-size, 15px);
}

.ybed-footer-inner a {
    color: #fff;
    font-weight: 900;
}

.ybed-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.ybed-footer-links a {
    font-size: var(--ybed-footer-menu-font-size, 16px);
}

.ybed-footer-social {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.ybed-footer-social a {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, rgba(36, 147, 209, 0.95), rgba(19, 167, 158, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.ybed-footer-social a:hover,
.ybed-footer-social a:focus-visible {
    transform: translateY(-3px);
    background: linear-gradient(135deg, var(--ybed-amber), var(--ybed-coral));
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.26);
}

.ybed-footer-social svg {
    width: 19px;
    height: 19px;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 980px) {
    .ybed-header-inner {
        flex-wrap: wrap;
        padding-block: 12px;
    }

    .ybed-nav {
        order: 3;
        flex-basis: 100%;
    }

    .ybed-nav-list {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .ybed-nav-list a {
        white-space: nowrap;
    }

    .ybed-nav-list .sub-menu {
        display: none;
    }

    .ybed-hero-inner {
        grid-template-columns: 1fr;
    }

    .ybed-hero-panel {
        max-width: 520px;
        align-self: auto;
    }

    .ybed-level-grid,
    .ybed-subject-grid,
    .ybed-tree-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 782px) {
    body.admin-bar .ybed-site-header {
        top: 46px;
    }

    .ybed-site-header {
        min-height: auto;
    }

    .ybed-header-inner {
        min-height: auto;
        padding-block: 8px;
        justify-content: space-between;
        gap: 8px;
    }

    .ybed-brand {
        order: 0;
        display: inline-flex;
        min-width: 0;
        max-width: calc(100% - 56px);
    }

    .ybed-brand-logo img {
        max-height: 42px;
    }

    .ybed-brand-mark {
        width: 40px;
        height: 40px;
    }

    .ybed-brand-text strong {
        font-size: 1.05rem;
    }

    .ybed-brand-text small {
        font-size: 0.76rem;
    }

    .ybed-header-search {
        order: 1;
        display: grid;
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
    }

    .ybed-nav {
        order: 2;
        flex: 1 1 100%;
        width: 100%;
        padding-top: 6px;
        border-top: 1px solid var(--ybed-line);
    }

    .ybed-nav-list {
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 4px;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .ybed-nav-list::-webkit-scrollbar {
        display: none;
    }

    .ybed-nav-list a {
        min-height: 40px;
        padding: 6px 12px;
        font-size: 16px;
    }

    .ybed-site-header.ybed-header-condensed .ybed-brand,
    .ybed-site-header.ybed-header-condensed .ybed-header-search {
        display: none;
    }

    .ybed-site-header.ybed-header-condensed .ybed-header-inner {
        padding-block: 4px;
    }

    .ybed-site-header.ybed-header-condensed .ybed-nav {
        order: 0;
        padding-top: 0;
        border-top: 0;
    }
}

@media (max-width: 680px) {
    .ybed-container {
        width: min(100% - 22px, 1180px);
    }

    .ybed-site-header {
        min-height: auto;
    }

    .ybed-header-inner {
        min-height: auto;
        padding-block: 8px;
        justify-content: space-between;
    }

    .ybed-brand {
        display: inline-flex;
    }

    .ybed-header-search {
        display: grid;
    }

    .ybed-nav {
        order: 2;
        flex: 1 1 100%;
    }

    .ybed-nav-list {
        justify-content: flex-start;
        padding-bottom: 4px;
    }

    .ybed-hero {
        background-image:
            linear-gradient(180deg, rgba(247, 250, 252, 0.92), rgba(247, 250, 252, 1) 68%),
            var(--ybed-hero-image);
        background-position: left top;
    }

    .ybed-hero-inner {
        min-height: auto;
        padding-block: 44px;
    }

    .ybed-search {
        grid-template-columns: 1fr;
    }

    .ybed-search-dialog {
        padding: 20px;
    }

    .ybed-overlay-search {
        grid-template-columns: 1fr;
    }

    .ybed-error-inner {
        grid-template-columns: 1fr;
    }

    .ybed-error-card {
        min-height: 220px;
    }

    .ybed-search button,
    .ybed-overlay-search button,
    .ybed-button {
        width: 100%;
    }

    .ybed-hero-actions,
    .ybed-section-heading,
    .ybed-band-title,
    .ybed-footer-inner {
        align-items: stretch;
        flex-direction: column;
    }

    .ybed-footer-inner {
        text-align: center;
    }

    .ybed-footer-links {
        order: 1;
        width: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .ybed-footer-links a {
        display: block;
        width: 100%;
        text-align: center;
        line-height: 1.7;
    }

    .ybed-footer-social {
        order: 2;
        width: 100%;
        justify-content: center;
    }

    .ybed-footer-inner p {
        order: 3;
        width: 100%;
        text-align: center;
    }

    .ybed-section-heading > span,
    .ybed-band-title > span {
        margin-inline-start: 0;
    }

    .ybed-level-grid,
    .ybed-subject-grid,
    .ybed-tree-grid {
        grid-template-columns: 1fr;
    }

    .ybed-subject-tile {
        grid-template-columns: 42px minmax(0, 1fr) auto;
    }

    .ybed-subject-icon {
        width: 42px;
        height: 42px;
    }

    .ybed-archive-hero {
        padding-block: 48px 38px;
    }

    .ybed-lesson-list a {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .ybed-lesson-number {
        width: 42px;
        height: 42px;
    }

    .ybed-lesson-arrow {
        display: none;
    }

    .ybed-article-content {
        padding: 18px;
    }

    .ybed-toc {
        padding: 14px;
    }

    .ybed-toc-children {
        margin-inline-start: 0;
        margin-inline-end: 28px;
    }

    .ybed-next-article,
    .ybed-comments-box {
        padding: 16px;
    }

    .ybed-comment-form button {
        width: 100%;
    }
}

.ybed-search,
.ybed-overlay-search {
    position: relative;
    isolation: isolate;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(213, 181, 111, 0.48);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 252, 255, 0.93)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(239, 248, 253, 0.82));
    box-shadow:
        0 24px 60px rgba(16, 32, 48, 0.13),
        0 1px 0 rgba(255, 255, 255, 0.94) inset,
        0 0 0 6px rgba(255, 255, 255, 0.52);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.ybed-search::before,
.ybed-overlay-search::before {
    content: "";
    position: absolute;
    inset: 5px;
    z-index: 0;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(229, 246, 255, 0.32));
    pointer-events: none;
}

.ybed-search:focus-within,
.ybed-overlay-search:focus-within {
    border-color: rgba(213, 181, 111, 0.88);
    box-shadow:
        0 30px 75px rgba(16, 32, 48, 0.18),
        0 0 0 1px rgba(213, 181, 111, 0.2) inset,
        0 0 0 7px rgba(240, 165, 43, 0.12);
    transform: translateY(-1px);
}

.ybed-search input,
.ybed-overlay-search input {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
    height: 62px;
    padding: 0 22px;
    border: 0 !important;
    border-radius: 8px;
    outline: 0 !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 253, 255, 0.88));
    color: #122033;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 0 0 1px rgba(184, 214, 230, 0.78) inset;
    font-weight: 800;
    text-align: right;
    -webkit-appearance: none;
    appearance: none;
    transition: box-shadow 0.22s ease, background 0.22s ease;
}

.ybed-search input::placeholder,
.ybed-overlay-search input::placeholder {
    color: rgba(18, 32, 51, 0.55);
    font-weight: 700;
}

.ybed-search input:focus,
.ybed-overlay-search input:focus,
.ybed-search input:focus-visible,
.ybed-overlay-search input:focus-visible {
    border: 0 !important;
    outline: 0 !important;
    background: rgba(255, 255, 255, 0.98);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 0 0 1px rgba(36, 147, 209, 0.2) inset;
}

.ybed-search button,
.ybed-overlay-search button {
    position: relative;
    z-index: 1;
    min-width: 132px;
    min-height: 62px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 8px;
    background:
        linear-gradient(135deg, #22a2dc, #0f75aa 58%, #07547d),
        linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent);
    color: #fff;
    box-shadow:
        0 18px 36px rgba(15, 117, 170, 0.34),
        0 1px 0 rgba(255, 255, 255, 0.3) inset;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.ybed-search button:hover,
.ybed-overlay-search button:hover,
.ybed-search button:focus-visible,
.ybed-overlay-search button:focus-visible {
    transform: translateY(-1px);
    filter: saturate(1.08);
    box-shadow:
        0 22px 42px rgba(15, 117, 170, 0.42),
        0 0 0 4px rgba(36, 147, 209, 0.15);
}

.ybed-search button svg,
.ybed-overlay-search button svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.4;
}

.ybed-search-dialog {
    overflow: hidden;
    width: min(980px, calc(100vw - 32px));
    border: 1px solid rgba(213, 181, 111, 0.48);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(246, 251, 254, 0.96)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(236, 247, 253, 0.78));
    box-shadow:
        0 36px 110px rgba(6, 22, 38, 0.36),
        0 0 0 1px rgba(255, 255, 255, 0.72) inset;
}

.ybed-search-dialog::before {
    inset: 12px;
    border-color: rgba(213, 181, 111, 0.3);
}

.ybed-search-dialog h2 {
    margin-inline: auto;
    color: #050b12;
    text-wrap: balance;
}

.ybed-search-close {
    border: 1px solid rgba(184, 214, 230, 0.88);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff, #f3f9fd);
    box-shadow:
        0 16px 30px rgba(18, 32, 51, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.ybed-search-overlay {
    background:
        linear-gradient(135deg, rgba(7, 18, 30, 0.72), rgba(18, 52, 66, 0.58)),
        rgba(18, 32, 51, 0.52);
    -webkit-backdrop-filter: blur(18px) saturate(1.05);
    backdrop-filter: blur(18px) saturate(1.05);
}

.ybed-hero .ybed-search {
    max-width: 860px;
    margin-inline: auto;
}

@media (max-width: 700px) {
    .ybed-search,
    .ybed-overlay-search {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .ybed-search input,
    .ybed-overlay-search input,
    .ybed-search button,
    .ybed-overlay-search button {
        width: 100%;
        min-width: 0;
        min-height: 58px;
    }

    .ybed-search-dialog {
        width: min(100%, calc(100vw - 22px));
        padding: 18px;
    }
}

.ybed-search,
.ybed-overlay-search,
.ybed-error-search {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 92px;
    padding: 14px;
    border: 1px solid rgba(220, 188, 118, 0.72);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 252, 255, 0.9)),
        radial-gradient(circle at 16% 18%, rgba(240, 165, 43, 0.16), transparent 34%),
        radial-gradient(circle at 82% 70%, rgba(36, 147, 209, 0.12), transparent 34%);
    box-shadow:
        0 28px 70px rgba(18, 32, 51, 0.14),
        0 0 0 6px rgba(255, 255, 255, 0.58),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.ybed-search::after,
.ybed-overlay-search::after {
    content: "";
    position: absolute;
    inset: 8px;
    z-index: 0;
    border: 1px solid rgba(255, 255, 255, 0.86);
    border-radius: 8px;
    pointer-events: none;
}

.ybed-search:focus-within,
.ybed-overlay-search:focus-within {
    border-color: rgba(240, 165, 43, 0.95);
    box-shadow:
        0 34px 82px rgba(18, 32, 51, 0.18),
        0 0 0 7px rgba(240, 165, 43, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.ybed-search input[type="search"],
.ybed-overlay-search input[type="search"],
.ybed-error-search input[type="search"] {
    position: relative;
    z-index: 1;
    height: 64px;
    padding: 0 24px;
    border: 0 !important;
    border-radius: 8px;
    outline: 0 !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 253, 255, 0.9));
    color: #122033;
    box-shadow:
        inset 0 0 0 1px rgba(199, 222, 234, 0.82),
        inset 0 1px 0 rgba(255, 255, 255, 0.98);
    font-size: clamp(1rem, 1.8vw, 1.14rem);
    font-weight: 900;
    text-align: right;
    -webkit-appearance: none;
    appearance: none;
}

.ybed-search input[type="search"]:focus,
.ybed-overlay-search input[type="search"]:focus,
.ybed-error-search input[type="search"]:focus,
.ybed-search input[type="search"]:focus-visible,
.ybed-overlay-search input[type="search"]:focus-visible,
.ybed-error-search input[type="search"]:focus-visible {
    border-color: transparent !important;
    outline: 0 !important;
    box-shadow:
        inset 0 0 0 1px rgba(36, 147, 209, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.98) !important;
}

.ybed-search input[type="search"]::placeholder,
.ybed-overlay-search input[type="search"]::placeholder {
    color: rgba(18, 32, 51, 0.58);
    font-weight: 800;
}

.ybed-search button,
.ybed-overlay-search button,
.ybed-error-search button {
    position: relative;
    z-index: 1;
    min-width: 150px;
    min-height: 64px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    background:
        linear-gradient(145deg, #2eb0e6, #147fb7 58%, #07557f),
        linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent);
    color: #fff;
    box-shadow:
        0 22px 42px rgba(10, 102, 154, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    font-size: 1.05rem;
    font-weight: 900;
}

.ybed-search button:hover,
.ybed-overlay-search button:hover,
.ybed-error-search button:hover,
.ybed-search button:focus-visible,
.ybed-overlay-search button:focus-visible,
.ybed-error-search button:focus-visible {
    transform: translateY(-2px);
    box-shadow:
        0 28px 52px rgba(10, 102, 154, 0.42),
        0 0 0 5px rgba(36, 147, 209, 0.16);
}

.ybed-search-dialog {
    width: min(920px, calc(100vw - 34px));
    padding: clamp(28px, 5vw, 54px);
    border: 1px solid rgba(220, 188, 118, 0.58);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(246, 251, 254, 0.96)),
        radial-gradient(circle at 12% 18%, rgba(240, 165, 43, 0.14), transparent 30%),
        radial-gradient(circle at 88% 82%, rgba(19, 167, 158, 0.12), transparent 32%);
}

.ybed-overlay-search {
    margin-top: 28px;
}

.ybed-subject-folder svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
}

.ybed-subject-folder .folder-back,
.ybed-subject-folder .folder-paper,
.ybed-subject-folder .folder-front {
    stroke: none;
}

.ybed-error-page {
    min-height: calc(100vh - var(--ybed-header-height));
    padding-block: clamp(54px, 8vw, 100px);
    background:
        linear-gradient(135deg, rgba(246, 251, 254, 0.94), rgba(237, 248, 252, 0.96)),
        var(--ybed-hero-image);
    background-size: cover;
    background-position: center;
}

.ybed-error-shell {
    position: relative;
    overflow: hidden;
    max-width: 920px;
    margin-inline: auto;
    padding: clamp(28px, 5vw, 58px);
    border: 1px solid rgba(220, 188, 118, 0.58);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(247, 252, 255, 0.88)),
        radial-gradient(circle at top right, rgba(240, 165, 43, 0.16), transparent 32%),
        radial-gradient(circle at bottom left, rgba(36, 147, 209, 0.14), transparent 34%);
    box-shadow:
        0 38px 100px rgba(18, 32, 51, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.96);
    text-align: center;
}

.ybed-error-shell::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 8px;
    pointer-events: none;
}

.ybed-error-shell .ybed-error-code {
    position: absolute;
    inset-inline: 0;
    top: -18px;
    z-index: 0;
    margin: 0;
    color: rgba(18, 32, 51, 0.055);
    font-size: clamp(7rem, 22vw, 14rem);
    line-height: 0.85;
    pointer-events: none;
}

.ybed-error-shell > *:not(.ybed-error-code) {
    position: relative;
    z-index: 1;
}

.ybed-error-shell h1 {
    max-width: 760px;
    margin: 18px auto 14px;
    font-size: clamp(2.25rem, 6vw, 4.6rem);
    line-height: 1.12;
}

.ybed-error-shell p {
    max-width: 680px;
    margin: 0 auto 26px;
    color: #334155;
    font-size: clamp(1.02rem, 2vw, 1.2rem);
    font-weight: 800;
}

.ybed-error-search {
    width: min(760px, 100%);
    margin-inline: auto;
}

.ybed-error-actions {
    justify-content: center;
    margin-top: 28px;
}

@media (max-width: 700px) {
    .ybed-search,
    .ybed-overlay-search,
    .ybed-error-search {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .ybed-search button,
    .ybed-overlay-search button,
    .ybed-error-search button {
        min-width: 0;
        width: 100%;
    }

    .ybed-error-shell {
        padding: 24px 16px;
    }
}

.ybed-hero-actions .ybed-button,
.ybed-error-actions .ybed-button {
    color: var(--ybed-button-text-color, currentColor);
}

.ybed-subject-icon {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: 50px;
    height: 50px;
    color: #b77300;
    background:
        linear-gradient(145deg, #fff9e8 0%, #ffe8a4 48%, #f7bb34 100%);
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow:
        0 14px 26px rgba(201, 134, 0, 0.22),
        0 6px 0 rgba(191, 121, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -10px 18px rgba(185, 112, 0, 0.1);
    transform-style: preserve-3d;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.ybed-subject-icon::before {
    content: "";
    position: absolute;
    inset: 5px 6px auto auto;
    width: 23px;
    height: 14px;
    z-index: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    filter: blur(0.5px);
    transform: rotate(-18deg);
}

.ybed-subject-icon::after {
    content: "";
    position: absolute;
    inset-inline: 8px;
    bottom: 5px;
    height: 8px;
    z-index: 0;
    border-radius: 999px;
    background: rgba(117, 70, 0, 0.16);
    filter: blur(5px);
}

.ybed-subject-folder svg {
    position: relative;
    z-index: 1;
    width: 37px;
    height: 37px;
    fill: none;
    stroke: currentColor;
    filter:
        drop-shadow(0 4px 4px rgba(120, 74, 0, 0.2))
        drop-shadow(0 1px 0 rgba(255, 255, 255, 0.8));
}

.ybed-subject-folder .folder-back {
    fill: #f2aa00;
}

.ybed-subject-folder .folder-paper {
    fill: #ffffff;
    opacity: 0.94;
}

.ybed-subject-folder .folder-front {
    fill: #ffd11a;
}

.ybed-subject-folder .folder-back,
.ybed-subject-folder .folder-paper,
.ybed-subject-folder .folder-front {
    stroke: none;
}

.ybed-subject-tile:hover .ybed-subject-icon,
.ybed-subject-tile:focus-visible .ybed-subject-icon {
    transform: perspective(560px) rotateX(8deg) rotateY(-9deg) translateY(-2px);
    box-shadow:
        0 18px 34px rgba(201, 134, 0, 0.28),
        0 7px 0 rgba(191, 121, 0, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        inset 0 -12px 20px rgba(185, 112, 0, 0.12);
}

.ybed-subject-tile:hover .ybed-subject-folder svg,
.ybed-subject-tile:focus-visible .ybed-subject-folder svg {
    filter:
        drop-shadow(0 7px 6px rgba(120, 74, 0, 0.24))
        drop-shadow(0 1px 0 rgba(255, 255, 255, 0.9));
}

.ybed-archive-hero {
    position: relative;
    overflow: hidden;
    color: var(--ybed-ink);
    padding-block: clamp(58px, 8vw, 92px);
    background:
        linear-gradient(135deg, rgba(249, 253, 255, 0.96), rgba(229, 247, 250, 0.92)),
        linear-gradient(90deg, rgba(36, 147, 209, 0.16), rgba(19, 167, 158, 0.1)),
        var(--ybed-hero-image);
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(199, 222, 234, 0.86);
}

.ybed-archive-hero::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--ybed-blue), var(--ybed-teal), var(--ybed-amber));
}

.ybed-archive-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 26px;
}

.ybed-archive-copy {
    max-width: 860px;
}

.ybed-archive-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 6px 14px;
    border: 1px solid rgba(19, 167, 158, 0.18);
    border-radius: 999px;
    color: #087c76;
    background: rgba(220, 246, 244, 0.86);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    font-weight: 900;
}

.ybed-archive-kicker svg {
    color: #d99a00;
}

.ybed-archive-kicker .folder-back,
.ybed-archive-kicker .folder-paper,
.ybed-archive-kicker .folder-front {
    stroke: none;
}

.ybed-archive-kicker .folder-back {
    fill: #efa900;
}

.ybed-archive-kicker .folder-paper {
    fill: #fff;
}

.ybed-archive-kicker .folder-front {
    fill: #ffcc16;
}

.ybed-archive-hero h1 {
    max-width: 920px;
    margin: 20px 0 0;
    color: #07111f;
    font-size: clamp(2.35rem, 5vw, 5rem);
    line-height: 1.08;
    letter-spacing: 0;
}

.ybed-archive-description {
    max-width: 760px;
    margin-top: 18px;
    color: #334155;
    font-size: clamp(1rem, 2vw, 1.15rem);
    font-weight: 700;
}

.ybed-archive-stat {
    flex: 0 0 auto;
    min-width: 126px;
    padding: 18px 20px;
    border: 1px solid rgba(220, 188, 118, 0.48);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(246, 251, 254, 0.86));
    box-shadow:
        0 24px 54px rgba(18, 32, 51, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    text-align: center;
}

.ybed-archive-stat strong {
    display: block;
    color: var(--ybed-blue-dark);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
}

.ybed-archive-stat span {
    display: block;
    margin-top: 6px;
    color: var(--ybed-muted);
    font-weight: 900;
}

.ybed-subject-icon {
    overflow: visible;
    width: 58px;
    height: 58px;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.ybed-subject-icon::before {
    inset: auto 8px 3px 8px;
    width: auto;
    height: 10px;
    border-radius: 999px;
    background: rgba(142, 96, 0, 0.2);
    filter: blur(7px);
    transform: none;
}

.ybed-subject-icon::after {
    inset: 7px 7px auto auto;
    width: 24px;
    height: 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    filter: blur(2px);
    transform: rotate(-22deg);
}

.ybed-subject-folder svg {
    width: 55px;
    height: 55px;
    transform: perspective(700px) rotateX(9deg) rotateY(-10deg);
    transform-origin: 50% 70%;
    filter:
        drop-shadow(0 14px 13px rgba(128, 82, 0, 0.2))
        drop-shadow(0 4px 0 rgba(171, 105, 0, 0.12));
}

.ybed-subject-folder .folder-back {
    fill: #f2ae00;
}

.ybed-subject-folder .folder-paper {
    fill: #fff8df;
    opacity: 0.98;
}

.ybed-subject-folder .folder-front {
    fill: #ffd21f;
}

.ybed-subject-folder svg path:not(.folder-back):not(.folder-paper):not(.folder-front) {
    stroke: currentColor;
}

.ybed-subject-tile:hover .ybed-subject-icon,
.ybed-subject-tile:focus-visible .ybed-subject-icon {
    transform: translateY(-2px);
    box-shadow: none;
}

.ybed-subject-tile:hover .ybed-subject-folder svg,
.ybed-subject-tile:focus-visible .ybed-subject-folder svg {
    transform: perspective(700px) rotateX(12deg) rotateY(-14deg) translateY(-2px);
    filter:
        drop-shadow(0 18px 15px rgba(128, 82, 0, 0.26))
        drop-shadow(0 5px 0 rgba(171, 105, 0, 0.13));
}

@media (max-width: 760px) {
    .ybed-archive-hero-inner {
        align-items: stretch;
        flex-direction: column;
    }

    .ybed-archive-stat {
        width: 100%;
        text-align: right;
    }
}

.ybed-subject-tile {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 14px;
}

.ybed-subject-icon {
    position: relative;
    isolation: isolate;
    overflow: visible;
    width: 64px;
    height: 58px;
    color: #b17300;
    background: transparent;
    border: 0;
    border-radius: 8px;
    box-shadow: none;
    transform: translateZ(0);
}

.ybed-subject-icon::before {
    content: "";
    position: absolute;
    inset-inline: 9px;
    bottom: 1px;
    z-index: 0;
    width: auto;
    height: 13px;
    border-radius: 999px;
    background:
        radial-gradient(ellipse at center, rgba(117, 74, 0, 0.28), rgba(117, 74, 0, 0) 72%);
    filter: blur(5px);
    transform: none;
}

.ybed-subject-icon::after {
    content: "";
    position: absolute;
    top: 9px;
    right: 15px;
    z-index: 2;
    width: 21px;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    filter: blur(1.5px);
    transform: rotate(-20deg);
    pointer-events: none;
}

.ybed-subject-folder svg {
    position: relative;
    z-index: 1;
    width: 58px;
    height: 58px;
    transform: perspective(760px) rotateX(8deg) rotateY(-8deg);
    transform-origin: 50% 74%;
    fill: none;
    stroke: currentColor;
    filter:
        drop-shadow(0 15px 14px rgba(129, 82, 0, 0.22))
        drop-shadow(0 4px 0 rgba(169, 103, 0, 0.13))
        drop-shadow(0 1px 0 rgba(255, 255, 255, 0.82));
    transition: transform 180ms ease, filter 180ms ease;
}

.ybed-subject-folder .folder-back {
    fill: #eba30b;
    stroke: none;
}

.ybed-subject-folder .folder-paper {
    fill: #fff8e6;
    opacity: 0.98;
    stroke: none;
}

.ybed-subject-folder .folder-front {
    fill: #ffcb22;
    stroke: none;
}

.ybed-subject-folder svg path:not(.folder-back):not(.folder-paper):not(.folder-front) {
    stroke: currentColor;
}

.ybed-subject-tile:hover .ybed-subject-icon,
.ybed-subject-tile:focus-visible .ybed-subject-icon {
    transform: translateY(-1px);
    box-shadow: none;
}

.ybed-subject-tile:hover .ybed-subject-folder svg,
.ybed-subject-tile:focus-visible .ybed-subject-folder svg {
    transform: perspective(760px) rotateX(11deg) rotateY(-13deg) translateY(-2px);
    filter:
        drop-shadow(0 19px 17px rgba(129, 82, 0, 0.28))
        drop-shadow(0 5px 0 rgba(169, 103, 0, 0.14))
        drop-shadow(0 1px 0 rgba(255, 255, 255, 0.88));
}

@media (max-width: 700px) {
    .ybed-subject-tile {
        grid-template-columns: 58px minmax(0, 1fr) auto;
    }

    .ybed-subject-icon {
        width: 58px;
        height: 54px;
    }

    .ybed-subject-folder svg {
        width: 52px;
        height: 52px;
    }
}

.ybed-subject-tile {
    grid-template-columns: 76px minmax(0, 1fr) auto;
}

.ybed-subject-icon {
    width: 72px;
    height: 66px;
    box-shadow: none !important;
}

.ybed-subject-icon::before {
    display: none;
}

.ybed-subject-icon::after {
    top: 10px;
    right: 18px;
    width: 24px;
    height: 13px;
    background: rgba(255, 255, 255, 0.62);
    filter: blur(1.2px);
}

.ybed-subject-folder svg {
    width: 66px;
    height: 66px;
    filter: none !important;
    transform: none;
}

.ybed-subject-tile:hover .ybed-subject-icon,
.ybed-subject-tile:focus-visible .ybed-subject-icon {
    transform: translateY(-1px);
    box-shadow: none !important;
}

.ybed-subject-tile:hover .ybed-subject-folder svg,
.ybed-subject-tile:focus-visible .ybed-subject-folder svg {
    filter: none !important;
    transform: translateY(-2px);
}

@media (max-width: 700px) {
    .ybed-subject-tile {
        grid-template-columns: 68px minmax(0, 1fr) auto;
    }

    .ybed-subject-icon {
        width: 64px;
        height: 60px;
    }

    .ybed-subject-folder svg {
        width: 60px;
        height: 60px;
    }
}

.ybed-subject-tile {
    grid-template-columns: 88px minmax(0, 1fr) auto;
    min-height: 96px;
    padding-block: 16px;
}

.ybed-subject-icon {
    width: 82px;
    height: 76px;
    color: #a86d00;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.ybed-subject-icon::before {
    display: none !important;
}

.ybed-subject-icon::after {
    display: block;
    top: 12px;
    right: 22px;
    width: 27px;
    height: 14px;
    z-index: 2;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.66);
    filter: blur(1px);
    transform: rotate(-18deg);
}

.ybed-subject-folder svg {
    width: 78px;
    height: 78px;
    transform: none !important;
    filter: none !important;
}

.ybed-subject-folder .folder-back {
    fill: #e8a800;
}

.ybed-subject-folder .folder-paper {
    fill: #fff7df;
    opacity: 1;
}

.ybed-subject-folder .folder-front {
    fill: #ffca1f;
}

.ybed-subject-tile:hover .ybed-subject-icon,
.ybed-subject-tile:focus-visible .ybed-subject-icon {
    transform: translateY(-1px);
    box-shadow: none !important;
}

.ybed-subject-tile:hover .ybed-subject-folder svg,
.ybed-subject-tile:focus-visible .ybed-subject-folder svg {
    transform: scale(1.035) !important;
    filter: none !important;
}

@media (max-width: 700px) {
    .ybed-subject-tile {
        grid-template-columns: 76px minmax(0, 1fr) auto;
        min-height: 88px;
    }

    .ybed-subject-icon {
        width: 72px;
        height: 68px;
    }

    .ybed-subject-folder svg {
        width: 68px;
        height: 68px;
    }
}

body.ybed-page .ybed-subject-tile {
    --ybed-subject-icon-size: var(--ybed-subject-icon-size-desktop, 96px);
    grid-template-columns: calc(var(--ybed-subject-icon-size) + 14px) minmax(0, 1fr) auto;
    min-height: calc(var(--ybed-subject-icon-size) + 8px);
}

body.ybed-page .ybed-subject-icon.ybed-subject-folder {
    width: calc(var(--ybed-subject-icon-size) + 8px) !important;
    height: var(--ybed-subject-icon-size) !important;
    display: grid;
    place-items: center;
}

body.ybed-page .ybed-subject-icon.ybed-subject-folder svg {
    width: var(--ybed-subject-icon-size) !important;
    height: var(--ybed-subject-icon-size) !important;
    min-width: var(--ybed-subject-icon-size) !important;
    min-height: var(--ybed-subject-icon-size) !important;
    max-width: none !important;
    max-height: none !important;
    filter: none !important;
    transform: none !important;
}

body.ybed-page .ybed-subject-tile:hover .ybed-subject-icon.ybed-subject-folder svg,
body.ybed-page .ybed-subject-tile:focus-visible .ybed-subject-icon.ybed-subject-folder svg {
    transform: scale(1.04) !important;
    filter: none !important;
}

@media (max-width: 700px) {
    body.ybed-page .ybed-subject-tile {
        --ybed-subject-icon-size: var(--ybed-subject-icon-size-mobile, 78px);
        grid-template-columns: calc(var(--ybed-subject-icon-size) + 10px) minmax(0, 1fr) auto;
        min-height: calc(var(--ybed-subject-icon-size) + 18px);
    }

    body.ybed-page .ybed-subject-icon.ybed-subject-folder {
        width: calc(var(--ybed-subject-icon-size) + 6px) !important;
        height: var(--ybed-subject-icon-size) !important;
    }

    body.ybed-page .ybed-subject-icon.ybed-subject-folder svg {
        width: var(--ybed-subject-icon-size) !important;
        height: var(--ybed-subject-icon-size) !important;
        min-width: var(--ybed-subject-icon-size) !important;
        min-height: var(--ybed-subject-icon-size) !important;
    }
}
