/*
 * THE BIBITES - Core Design System
 * Owned shell and static page styles live here.
 */

:root {
    --color-base: #050f08;
    --color-contrast: #ffffff;
    --color-primary: #ff746d;
    --color-secondary: #0d2010;
    --color-tertiary: #fb326b;
    --color-accent-green: #3db85f;
    --color-accent-blue: #8ed1fc;
    --color-accent-gold: #fcb900;
    --color-panel: #2a2a2a;
    --color-panel-border: rgba(255, 255, 255, 0.13);
    --space-2xs: 0.44rem;
    --space-xs: clamp(1.5rem, 5vw, 2rem);
    --space-sm: clamp(1.8rem, 1.8rem + ((1vw - 0.48rem) * 2.885), 3rem);
    --space-md: clamp(2.5rem, 8vw, 4.5rem);
    --space-lg: clamp(3.75rem, 10vw, 7rem);
    --space-xl: clamp(5rem, 5.25rem + ((1vw - 0.48rem) * 9.096), 8rem);
    --content-width: 800px;
    --wide-width: 1300px;
    --font-sans: "Roboto", "DM Sans", sans-serif;
    --font-mono: "IBM Plex Mono", monospace;
    --font-size-small: clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.227), 1rem);
    --font-size-medium: clamp(1rem, 1rem + ((1vw - 0.2rem) * 0.227), 1.125rem);
    --font-size-large: 1.75rem;
    --font-size-x-large: 3.25rem;
    --font-size-xx-large: clamp(4rem, 4rem + ((1vw - 0.2rem) * 29.091), 20rem);
}

@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 400;
    font-display: fallback;
    src: url("../fonts/DMSans-Regular.woff2") format("woff2");
}

@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 700;
    font-display: fallback;
    src: url("../fonts/DMSans-Bold.woff2") format("woff2");
}

@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url("../fonts/IBMPlexMono-Regular.woff2") format("woff2");
}

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

html {
    background-color: var(--color-base);
}

body {
    margin: 0;
    background-color: var(--color-base);
    color: var(--color-contrast);
    font-family: var(--font-sans);
    font-size: var(--font-size-medium);
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 1rem;
    font-family: var(--font-sans);
    font-weight: 900;
    line-height: 1.2;
}

h1 {
    font-size: var(--font-size-x-large);
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 2rem;
}

p {
    margin: 0 0 1rem;
}

strong,
b {
    font-weight: 700;
}

/* Owned shell */

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background: linear-gradient(146deg, #0b2114 0%, #051b20 55%, #020d15 100%);
}

body.home .site-shell {
    background: none;
}

.site-container,
.thebibites-container {
    width: 100%;
    max-width: var(--wide-width);
    margin: 0;
    padding: 0 40px;
}

.site-header,
.thebibites-header {
    width: 100%;
    height: 57px;
    background: var(--color-base);
}

.site-header .site-container,
.thebibites-header .thebibites-container {
    max-width: none;
}

.site-header__row,
.thebibites-header-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 32px;
    width: 100%;
    height: 57px;
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
}

.site-branding,
.thebibites-branding {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.site-brand__logo {
    border-radius: 50%;
}

.thebibites-site-title {
    display: flex;
    align-items: flex-end;
    height: 29px;
    margin: 0 0 0 10px;
    border-style: solid;
    border-width: 0 0 3px;
    border-color: var(--color-primary);
    white-space: nowrap;
    font-size: 21px;
    font-weight: 800;
    line-height: normal;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
}

.thebibites-site-title a {
    color: inherit;
    text-decoration: none;
}

.site-nav,
.thebibites-nav {
    display: flex;
    align-items: center;
}

.site-nav__list,
.thebibites-nav-ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
    font-weight: 700;
}

.site-nav a,
.thebibites-nav a {
    color: inherit;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"],
.thebibites-nav a:hover,
.thebibites-nav a[aria-current="page"] {
    text-decoration: underline;
}

.site-nav__admin-link {
    padding: 5px 10px;
    border: 1px solid var(--color-accent-gold);
    border-radius: 4px;
    color: var(--color-accent-gold) !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.site-nav__admin-link:hover,
.site-nav__admin-link[aria-current="page"] {
    background: rgba(252, 185, 0, 0.14);
    text-decoration: none !important;
}

.site-auth {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-height: 36px;
    margin-left: auto;
    flex-shrink: 0;
}

.site-auth[hidden],
.site-auth__button[hidden],
.site-auth__user[hidden] {
    display: none !important;
}

.site-auth__button {
    min-height: 32px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 4px;
    background: transparent;
    color: var(--color-contrast);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.site-auth__button:hover,
.site-auth__button:focus-visible {
    background: rgba(255, 255, 255, 0.1);
}

.site-auth__button--secondary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #140606;
}

.site-auth__button--secondary:hover,
.site-auth__button--secondary:focus-visible {
    background: #ff8c86;
}

.site-auth__user {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 32px;
}

.site-nav__toggle,
.custom-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 5px;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    z-index: 10001;
}

.site-nav__toggle-line {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-line:first-child {
    transform: translateY(3.5px) rotate(45deg);
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-line:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
}

.site-footer {
    width: 100%;
    padding: 20px 0;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    margin: 0 auto;
}

.site-social-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em 15px;
    margin: 10px 0;
    padding: 0;
    list-style: none;
    font-size: 24px;
}

.site-social-link {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 9999px;
    color: currentColor;
    line-height: 0;
    fill: currentColor;
    transition: transform 0.1s ease;
}

.site-social-link:hover {
    transform: scale(1.1);
    text-decoration: none;
}

.site-social-link svg {
    width: 1em;
    height: 1em;
}

.site-social-link--reddit {
    background: #ff4500;
    color: #fff;
}

.site-social-link--patreon {
    background: #000;
    color: #fff;
}

.site-social-link--twitter {
    background: #1da1f2;
    color: #fff;
}

.site-social-link--youtube {
    background: red;
    color: #fff;
}

.site-footer__credit {
    margin: 0;
    text-align: right;
}

.site-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

/* Owned home page */

.home-main {
    flex: 1;
}

.home-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 900px;
    padding: var(--space-xs) 15%;
    overflow: hidden;
}

.home-hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-hero__overlay {
    position: absolute;
    inset: 0;
    background: #000;
    opacity: 0.5;
}

.home-hero__content {
    position: relative;
    z-index: 1;
    width: 100%;
    text-align: center;
    color: var(--color-contrast);
}

.home-hero__intro {
    max-width: 450px;
    margin: 0 auto;
}

.home-hero__eyebrow {
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.home-hero__title {
    margin: var(--space-xs) 0;
    font-size: var(--font-size-x-large);
    text-transform: uppercase;
}

.home-hero__copy {
    display: grid;
    gap: 10px;
}

.home-hero__copy-line {
    margin: 0;
    font-size: clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.682), 1.25rem);
}

.home-hero__copy-line--claim {
    padding-top: 10px;
    font-size: clamp(0.957rem, 0.957rem + ((1vw - 0.2rem) * 0.896), 1.45rem);
}

.home-store-grid {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
    gap: var(--space-lg);
    padding-top: 40px;
    align-items: start;
}

.home-store-card {
    display: grid;
    justify-items: center;
}

.home-store-card__title {
    margin-bottom: 15px;
    text-align: center;
    color: var(--color-contrast);
    font-size: 2rem;
}

.home-store-card__embed {
    display: flex;
    justify-content: center;
}

.home-social-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2em;
    margin: var(--space-xs) 0;
    padding: var(--space-xs);
    align-items: center;
}

.home-social-card {
    display: block;
}

.home-social-card:hover {
    text-decoration: none;
}

.home-features {
    min-height: 746px;
    padding: var(--space-sm) 20%;
    background: linear-gradient(180deg, rgba(3, 3, 40, 0.98) 0%, rgba(15, 22, 66, 0.98) 100%);
}

.home-features__content {
    width: 100%;
}

.home-features__intro {
    display: grid;
    gap: var(--space-sm);
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.home-features__intro p {
    margin: 0;
}

.home-feature {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-md);
    align-items: center;
    margin: var(--space-xs) 0;
}

.home-feature__copy {
    text-align: center;
}

.home-feature__copy p:last-child {
    margin-bottom: 0;
}

.home-feature__title {
    margin-bottom: 1rem;
    color: var(--color-contrast);
    font-size: var(--font-size-large);
}

.home-feature__media {
    display: flex;
    justify-content: center;
    margin: 0;
}

.home-feature__image--evolution {
    border: 2px solid #fff;
    border-radius: 4px;
}

.home-feature__image--brain {
    border: 2px solid #222;
    border-radius: 4px;
}

.home-feature__image--stomach {
    border-radius: 4px;
}

/* Page-specific owned styles */

.page-main {
    flex: 1;
}

.page-main__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 90vh;
    padding: 0 15%;
}

.page-body {
    width: 100%;
    padding-bottom: var(--space-lg);
}

.page-body--narrow {
    max-width: 650px;
    margin: 0 auto;
}

.page-body--reading {
    max-width: 800px;
    margin: 0 auto;
}

.page-body--centered {
    text-align: center;
}

.page-title-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-title {
    margin: 0;
    padding: var(--space-xs) 0;
    font-size: var(--font-size-x-large);
    font-weight: 700;
    letter-spacing: 0.1rem;
    text-transform: capitalize;
    text-align: center;
}

.page-copy p:last-child {
    margin-bottom: 0;
}

.page-section-title {
    margin: 0 0 var(--space-xs);
    text-align: center;
    font-size: var(--font-size-x-large);
}

.page-section-subtitle {
    margin: 0 0 var(--space-xs);
    padding-top: var(--space-xs);
    padding-bottom: var(--space-2xs);
    text-align: center;
    font-size: clamp(1.5rem, 1.5rem + 1vw, 2.5rem);
}

.page-figure {
    margin: 0;
}

.page-figure--center {
    display: flex;
    justify-content: center;
}

.text-accent {
    color: var(--color-primary);
}

.about-story {
    margin-bottom: var(--space-xs);
}

.about-story__paragraph {
    font-size: var(--font-size-small);
    font-weight: 700;
}

.about-story__paragraph:last-child {
    margin-bottom: 0;
}

.about-team-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2em;
}

.about-member {
    padding: 15px 0;
    text-align: center;
}

.about-member__title {
    margin-bottom: 0.5rem;
    font-size: clamp(1.25rem, 1.25rem + ((1vw - 0.2rem) * 1.364), 2rem);
}

.about-member__role {
    margin-bottom: 0.25rem;
}

.about-member__role--featured {
    font-size: var(--font-size-medium);
    font-weight: 700;
}

.about-member__tagline {
    font-size: var(--font-size-small);
}

.about-member__media {
    margin: 0;
}

.about-member__image {
    width: 100%;
    border-radius: 4px;
}

.about-member--icon .about-member__media {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0818;
    border-radius: 4px;
    overflow: hidden;
}

.about-member--icon .about-member__image {
    border-radius: 0;
    object-fit: contain;
}

.patreon-support__intro {
    display: grid;
    gap: 1rem;
    padding-bottom: var(--space-xs);
}

.patreon-support__actions {
    display: grid;
    justify-items: center;
    gap: var(--space-xs);
    max-width: 44rem;
    margin: 0 auto;
}

.patreon-support__cta {
    margin: 0;
    text-align: center;
}

.patreon-support__intro p,
.patreon-support__link {
    margin-bottom: 0;
}

.patreon-support__cta .subscribe-button {
    margin-inline: auto;
}

.patreon-support__image {
    width: min(324px, 100%);
}

.roadmap-board {
    display: flex;
    justify-content: center;
    padding: var(--space-xs) 0;
}

.roadmap-board .trello-board-compact {
    margin: 0;
}

.intro-text {
    max-width: 800px;
    margin: 0 auto 60px;
    text-align: center;
    opacity: 0.9;
}

.channel-header {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
    padding: 20px 0;
}

.profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
}

.channel-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.channel-name {
    margin: 0;
    font-size: 1.8rem;
}

.channel-details {
    margin: 0;
    opacity: 0.8;
}

.subscribe-button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 10px 25px;
    border-radius: 4px;
    background: #ff0000;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.subscribe-button:hover {
    background: #cc0000;
    color: #fff;
    text-decoration: none;
}

.subscribe-button--patreon {
    gap: 0;
    padding: 12px 28px;
    border-radius: 4px;
    background: #f7678a;
}

.subscribe-button--patreon:hover {
    background: #e45076;
}

#videoGrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin: 24px 0;
    padding: 0;
    width: 100%;
}

.yt-load-more-wrap {
    display: flex;
    justify-content: center;
    margin: 8px 0 32px;
}

.yt-load-more-btn {
    appearance: none;
    padding: 12px 32px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: transparent;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.yt-load-more-btn:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.06);
}

.yt-load-more-btn:hidden,
.yt-load-more-wrap--hidden {
    display: none;
}

.news-list {
    display: grid;
    gap: 28px;
}

.news-card {
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
    gap: 24px;
    padding: 0 0 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.news-card:last-child {
    border-bottom: 0;
}

.news-card__image-link {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
}

.news-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card__body {
    min-width: 0;
}

.news-card__date {
    display: block;
    margin-bottom: 8px;
    color: var(--color-accent-green);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.news-card__title {
    margin-bottom: 10px;
    font-size: clamp(1.35rem, 1.2rem + 1vw, 2rem);
}

.news-card__title a,
.news-article__title a,
.news-article__content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.18em;
}

.news-card__summary {
    margin-bottom: 14px;
    opacity: 0.9;
}

.news-back-link {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.news-pagination {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
}

.news-pagination__link {
    padding: 10px 0;
    color: var(--color-primary);
    font-weight: 700;
}

.news-empty {
    text-align: center;
    opacity: 0.82;
}

.news-author-tag {
    display: inline-flex;
    width: fit-content;
    margin: 0 0 10px;
    padding: 3px 8px;
    border: 1px solid rgba(252, 185, 0, 0.45);
    border-radius: 4px;
    color: var(--color-accent-gold);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.35;
    text-transform: uppercase;
}

.news-article {
    padding-top: var(--space-xs);
}

.news-article__header {
    margin-bottom: 28px;
}

.news-article__title {
    padding: 8px 0 0;
    text-align: left;
    text-transform: none;
}

.news-article__summary {
    max-width: 680px;
    opacity: 0.88;
}

.news-article__hero {
    margin: 0 0 32px;
}

.news-article__hero img {
    width: 100%;
    border-radius: 4px;
}

.news-article__content {
    font-size: var(--font-size-medium);
}

.news-article__content a {
    color: var(--color-primary);
    text-decoration: underline;
}

.news-section-divider {
    margin: 2rem 0 1.2rem;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.news-section-author {
    display: inline-flex;
    margin: -0.4rem 0 1rem;
    padding: 3px 8px;
    border-left: 3px solid var(--color-accent-gold);
    color: var(--color-accent-gold);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.news-article__content ul,
.news-article__content ol {
    padding-left: 1.4em;
}

.news-article__content blockquote {
    margin: 1.5rem 0;
    padding-left: 1rem;
    border-left: 3px solid var(--color-primary);
    opacity: 0.9;
}

.news-article__content pre,
.news-article__content code {
    font-family: var(--font-mono);
}

.news-article__content pre {
    overflow-x: auto;
    padding: 1rem;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.35);
}

.admin-home,
.admin-news {
    max-width: 1180px;
    margin: 0 auto;
}

.admin-home {
    display: grid;
    gap: 24px;
}

.admin-home__status,
.admin-home__section {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.18);
}

.admin-home__status--error {
    color: var(--color-primary);
}

.admin-home__section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.admin-home__section-header h2,
.admin-home__section-header p {
    margin: 0;
}

.admin-home__users {
    display: grid;
    gap: 8px;
}

.admin-home__user {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(130px, auto);
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
}

.admin-home__user-main {
    display: grid;
    min-width: 0;
}

.admin-home__user-main strong,
.admin-home__user-main span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-home__user-main span {
    font-size: 0.85rem;
    opacity: 0.76;
}

.admin-home__user-controls {
    display: flex;
    justify-content: flex-end;
}

.admin-home__user-controls select,
.admin-news__field select {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 4px;
    background: #07160c;
    color: #fff;
    font: inherit;
}

.admin-home__role-badge,
.admin-home__content-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--color-accent-gold);
    border-radius: 4px;
    color: var(--color-accent-gold);
    font-weight: 700;
}

.admin-home__content-link {
    color: var(--color-accent-gold);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.admin-home__empty {
    margin: 0;
    opacity: 0.76;
}

.admin-auth {
    width: 100%;
    max-width: 760px;
    margin: 0 auto var(--space-md);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#adminSignIn {
    width: 100%;
    display: flex;
    justify-content: center;
}

#adminSignIn > *,
.admin-auth .cl-rootBox,
.admin-auth .cl-cardBox,
.admin-auth .cl-card {
    margin-right: auto;
    margin-left: auto;
}

.admin-news__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.admin-news__eyebrow {
    margin-bottom: 4px;
    color: var(--color-accent-green);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-news__status {
    margin: 0;
    opacity: 0.82;
}

.admin-news__status--error {
    color: var(--color-primary);
    opacity: 1;
}

.admin-news__workspace {
    display: grid;
    grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.admin-news__sidebar,
.admin-news__editor {
    min-width: 0;
}

.admin-news__sidebar {
    display: grid;
    gap: 12px;
    max-height: calc(100vh - 160px);
    min-height: 620px;
}

.admin-news__search {
    display: grid;
    gap: 7px;
}

.admin-news__search label {
    font-weight: 700;
}

.admin-news__search input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.24);
    color: #fff;
    font: inherit;
}

.admin-news__new,
.admin-news__button {
    appearance: none;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.admin-news__new {
    width: 100%;
}

.admin-news__button:hover,
.admin-news__new:hover {
    background: rgba(255, 255, 255, 0.12);
}

.admin-news__button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.admin-news__button--primary {
    border-color: var(--color-accent-green);
    background: rgba(61, 184, 95, 0.22);
}

.admin-news__button--danger {
    border-color: var(--color-primary);
    color: #ffd8d6;
}

.admin-news__feed {
    display: grid;
    grid-template-rows: minmax(220px, 1fr) minmax(220px, 1fr);
    gap: 12px;
    min-height: 0;
}

.admin-news__feed-section {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    min-height: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.14);
}

.admin-news__feed-section h2 {
    margin: 0;
    color: var(--color-accent-green);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-news__posts {
    display: grid;
    gap: 8px;
}

.admin-news__posts--scroll {
    align-content: start;
    overflow-y: auto;
    padding-right: 4px;
}

.admin-news__post {
    appearance: none;
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.18);
    color: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.admin-news__post.is-active {
    border-color: var(--color-accent-green);
    background: rgba(61, 184, 95, 0.14);
}

.admin-news__post-title,
.admin-news__post-meta {
    display: block;
}

.admin-news__post-title {
    font-weight: 700;
}

.admin-news__post-meta,
.admin-news__empty {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.72;
}

.admin-news__editor {
    display: grid;
    gap: 16px;
}

.admin-news__field {
    display: grid;
    gap: 7px;
}

.admin-news__field label {
    font-weight: 700;
}

.admin-news__field input,
.admin-news__field select,
.admin-news__field textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.24);
    color: #fff;
    font: inherit;
}

.admin-news__field textarea {
    resize: vertical;
}

.admin-news__field--upload {
    grid-template-columns: 1fr;
}

.admin-news__field input[type="file"] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-news__upload-state {
    margin: 0;
    padding: 10px 12px;
    border-left: 3px solid var(--color-accent-green);
    background: rgba(61, 184, 95, 0.08);
    font-size: 0.9rem;
    line-height: 1.45;
}

.admin-news__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-news__preview {
    margin-top: 12px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.admin-news__preview h2 {
    font-size: 1.25rem;
}

.item {
    display: block;
    color: #fff;
    transition: transform 0.2s ease;
}

.item:hover {
    transform: translateY(-5px);
    text-decoration: none;
}

.thumb {
    position: relative;
    width: 100%;
    margin-bottom: 12px;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
    background-position: center;
    background-size: cover;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    transform: translate(-50%, -50%);
}

.play-icon img {
    width: 100%;
}

.video-details {
    display: flex;
    gap: 10px;
}

.vid-avatar {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
}

.vid-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.vid-info {
    min-width: 0;
}

.vid-info .title {
    display: -webkit-box;
    margin-bottom: 4px;
    overflow: hidden;
    font-weight: 700;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.vid-info .meta {
    font-size: 0.85rem;
    opacity: 0.7;
}

.vid-info .desc {
    display: -webkit-box;
    margin-top: 8px;
    overflow: hidden;
    font-size: 0.85rem;
    opacity: 0.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}


.page-number,
.ep-prev,
.ep-next {
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.page-number.active__current_page {
    background: var(--color-primary);
    color: var(--color-base);
}

.ep-prev,
.ep-next {
    cursor: pointer;
    color: var(--color-primary);
    font-weight: 700;
    user-select: none;
}

.supporters-main {
    flex: 1;
}

.supporters-hero {
    padding: 72px 20px 40px;
}

.supporters-hero__inner {
    max-width: 980px;
    margin: 0 auto;
    text-align: center;
}

.supporters-hero__eyebrow {
    margin: 0 0 12px;
    color: var(--color-primary);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.supporters-hero__title {
    margin-bottom: 16px;
    font-size: clamp(2.8rem, 6vw, 5.4rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.supporters-hero__intro {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.1rem;
    opacity: 0.94;
}

.supporters-hero__thanks {
    max-width: 700px;
    margin: 18px auto 0;
    color: rgba(255, 255, 255, 0.8);
}

.supporters-hero__cta {
    margin-top: 30px;
}

.supporters-hero__cta .subscribe-button {
    margin-inline: auto;
    padding: 16px 34px;
}

.supporters-content {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

.supporters-status {
    margin: 0 auto 24px;
    color: rgba(255, 255, 255, 0.76);
    text-align: center;
}

.supporters-status--error {
    color: #ffd1d0;
}

.patreon-cta {
    display: flex;
    justify-content: center;
    margin: 1rem 0 5rem;
}

.patreon-cta img {
    max-width: 380px;
    width: 100%;
}

.supporters-wrap {
    width: 100%;
    padding-bottom: var(--space-lg);
}

body.page-patreon .page-title {
    padding: 0.6rem 0;
}

body.page-patreon .page-body {
    padding-bottom: 1rem;
}


.supporters-sections {
    display: grid;
    gap: 40px;
}

.supporters-section {
    --supporter-accent: var(--color-accent-blue);
    --supporter-shadow: rgba(142, 209, 252, 0.14);
    --supporter-art-scale: 1;
    --supporter-list-scale: 0.72;
    padding: 34px 28px 38px;
}

.supporters-section__title {
    margin: 0 0 24px;
    color: var(--supporter-accent);
    text-align: center;
    font-size: clamp(1.9rem, 2vw, 2.6rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
}

.supporters-section__title::after {
    content: ' \25B8';
    display: inline-block;
    font-size: 0.7em;
    transition: transform 0.25s ease;
}

.supporters-section.is-open .supporters-section__title::after {
    transform: rotate(90deg);
}

.supporters-section__benefits-wrap {
    max-width: 840px;
    margin: 0 auto 20px;
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.supporters-section.is-open .supporters-section__benefits-wrap {
    max-height: 500px;
}

.supporters-section__benefit-label {
    margin: 0 0 12px;
    text-align: center;
    font-size: 0.94rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.75;
}

.supporters-section__benefits {
    margin: 0 auto;
    padding-left: 20px;
    max-width: 720px;
    display: grid;
    gap: 6px;
    color: rgba(255, 255, 255, 0.85);
}

.supporters-section__benefits li {
    line-height: 1.5;
}

.supporters-grid--rich {
    display: grid;
    width: min(100%, 1280px);
    margin: 0 auto;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    justify-items: center;
    gap: 34px 24px;
}

.supporter-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 215px;
    padding: 0;
    text-align: center;
}

.supporter-card__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
    margin-bottom: 4px;
}

.supporter-card__art {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    filter: drop-shadow(0 14px 20px var(--supporter-shadow));
    transform: scale(var(--supporter-art-scale));
    transform-origin: center;
}

.supporter-card__name {
    margin: 0;
    max-width: 220px;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
}

.supporters-list-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: min(100%, 1200px);
    margin: 0 auto;
    padding: 0;
    list-style: none;
    gap: 16px 22px;
}

.supporter-list-item {
    display: flex;
    align-items: center;
    flex: 0 1 calc(33.333% - 15px);
    gap: 14px;
    min-height: 74px;
    padding: 12px 16px;
}

.supporter-list-item__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
}

.supporter-list-item__art {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    filter: drop-shadow(0 10px 12px var(--supporter-shadow));
    transform: scale(var(--supporter-list-scale));
    transform-origin: center;
}

.supporter-list-item__name {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}

.supporters-section--rockstar {
    --supporter-accent: var(--color-accent-gold);
    --supporter-shadow: rgba(252, 185, 0, 0.16);
    --supporter-art-scale: 0.7;
}

.supporters-section--predator {
    --supporter-accent: #ff7d7d;
    --supporter-shadow: rgba(255, 94, 94, 0.16);
    --supporter-art-scale: 0.65;
}

.supporters-section--herbivore {
    --supporter-accent: var(--color-accent-blue);
    --supporter-shadow: rgba(142, 209, 252, 0.14);
    --supporter-art-scale: 0.6;
}

.supporters-section--egg {
    --supporter-accent: #fff1b8;
    --supporter-shadow: rgba(255, 241, 184, 0.16);
    --supporter-art-scale: 0.5;
    --supporter-list-scale: 0.78;
}

.supporters-section--pellet {
    --supporter-accent: #95ef8d;
    --supporter-shadow: rgba(149, 239, 141, 0.18);
    --supporter-art-scale: 0.5;
    --supporter-list-scale: 0.82;
}

/* Responsive */

@media (max-width: 1100px) {
    .page-main__inner {
        padding-right: 40px;
        padding-left: 40px;
    }
}

@media (max-width: 900px) {
    .site-branding,
    .thebibites-branding {
        order: 1;
    }

    .site-auth {
        order: 3;
        margin-left: 8px;
    }

    .site-nav,
    .thebibites-nav {
        order: 2;
        margin-left: auto;
        position: relative;
    }

    .site-nav__toggle,
    .custom-menu-toggle {
        display: flex;
    }

    .site-nav__list,
    .thebibites-nav-ul {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        display: none;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 4px;
        width: min(260px, calc(100vw - 32px));
        max-width: min(260px, calc(100vw - 32px));
        padding: 12px;
        background: var(--color-base);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 4px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
        z-index: 10000;
    }

    .site-nav__list li,
    .thebibites-nav-ul li {
        width: 100%;
    }

    .site-nav__list.is-open,
    .thebibites-nav-ul.is-open {
        display: flex;
    }

    .site-nav__list li a,
    .thebibites-nav-ul li a {
        display: block;
        width: 100%;
        padding: 10px 12px;
        font-size: 1.125rem;
        line-height: 1.2;
        text-align: left;
    }

    .home-hero {
        min-height: auto;
        padding: var(--space-xs) 20px;
    }

    .home-store-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xs);
    }

    .home-store-card {
        width: 100%;
    }

    .home-features {
        padding: var(--space-sm) 20px;
    }

    .home-store-card__embed iframe {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .site-auth__button--secondary {
        display: none;
    }

    .site-auth__button {
        padding-right: 10px;
        padding-left: 10px;
        font-size: 0.78rem;
    }
}

@media (max-width: 768px) {
    .site-container,
    .thebibites-container {
        padding-right: 20px;
        padding-left: 20px;
    }

    .page-main__inner {
        padding-right: 20px;
        padding-left: 20px;
    }

    .site-footer__inner {
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: 8px;
    }

    .site-footer__credit {
        text-align: center;
        width: 100%;
    }

    .site-social-links {
        justify-content: center;
        margin: 0;
    }

    .home-social-grid,
    .home-feature,
    .about-team-grid {
        grid-template-columns: 1fr;
    }

    .channel-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .news-card {
        grid-template-columns: 1fr;
    }

    .news-pagination {
        flex-direction: column;
    }

    .admin-news__topbar,
    .admin-news__workspace {
        grid-template-columns: 1fr;
    }

    .admin-home__user {
        grid-template-columns: 1fr;
    }

    .admin-home__user-controls {
        justify-content: flex-start;
    }

    .admin-news__topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-news__sidebar {
        max-height: none;
        min-height: 0;
    }

    .admin-news__feed {
        grid-template-rows: minmax(180px, 280px) minmax(180px, 280px);
    }

    #videoGrid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .profile-picture {
        width: 120px;
        height: 120px;
    }

    .channel-info {
        align-items: center;
    }

    .subscribe-button {
        margin: 0 auto;
    }

    .intro-text {
        padding: 0 10px;
    }

    .supporters-hero {
        padding-top: 56px;
    }

    .supporters-section {
        padding: 28px 20px 32px;
    }

    .supporters-grid--rich {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 28px 18px;
    }

    .supporter-card {
        max-width: 170px;
    }

    .supporter-card__avatar {
        width: 142px;
        height: 142px;
    }

    .supporters-list-grid {
        width: 100%;
    }

    .supporter-list-item {
        flex: 0 1 calc(50% - 11px);
    }

    .supporters-content {
        padding-right: 14px;
        padding-left: 14px;
    }
}

@media (max-width: 520px) {
    .supporters-grid--rich {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 16px;
    }

    .supporter-list-item {
        flex: 0 1 100%;
    }

    .supporter-card {
        max-width: 144px;
    }

    .supporter-card__avatar {
        width: 120px;
        height: 120px;
    }

    .supporter-list-item {
        min-height: 64px;
        padding: 10px 14px;
    }

    .supporter-card__name {
        font-size: 0.92rem;
    }
}

@media (max-width: 400px) {
    .supporters-grid--rich {
        grid-template-columns: 1fr;
    }

    .supporter-card__avatar {
        width: 120px;
        height: 120px;
    }
}
