@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700;800&family=Source+Serif+4:wght@600;700&display=swap');

:root {
    --accent: #54B435;
    --accent-dark: #379237;
    --focus: #245213;
    --border: #D5EAD8;
    --site-bg: #EDFBE2;
    --content-bg: #FFFFFF;
    --heading: #0F172A;
    --text: #2F3B40;
    --dark: #20262b;
    --shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
    margin: 0;
    background: var(--site-bg);
    color: var(--text);
    font-family: var(--body-font, "Source Sans 3", sans-serif);
    font-size: var(--base-font-size, 16px);
    line-height: var(--line-height-scale, 1.6);
}

img,
.protected-media {
    -webkit-user-drag: none;
    user-select: none;
}

p, li, h1, h2, h3, h4, h5, h6, span, article, section, main {
    user-select: text;
}

h1, h2, h3 {
    font-family: var(--heading-font, "Source Serif 4", serif);
    color: var(--heading);
    line-height: 1.15;
    margin: 0 0 14px;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { color: var(--focus); }

button, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent);
    border-radius: var(--button-radius, 6px);
    background: var(--accent);
    color: var(--primary-button-text, #fff);
    padding: 10px 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--button-shadow, none);
}

.secondary {
    background: var(--secondary-button-bg, #fff);
    color: var(--accent-dark);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.social-links a {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px 10px;
    background: var(--content-bg);
    color: var(--accent-dark);
    font-weight: 800;
    font-size: 13px;
}

.header-social-links {
    margin-left: 4px;
}

.footer-social-links {
    margin-top: 12px;
}

.module-research,
[data-home-section="featured_research"] {
    --accent: var(--research-accent, #54B435);
}

.academy-course-page,
[data-home-section="academy_cta"] {
    --accent: var(--academy-accent, #379237);
}

.product-page,
[data-home-section="shop_highlights"] {
    --accent: var(--shop-accent, #245213);
}

.header-search,
.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input {
    width: 160px;
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
}

.header-search button {
    padding: 8px 12px;
}

.search-form input {
    min-width: min(520px, 100%);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 14px;
    font: inherit;
}

.frontend-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--header-bg, #fff);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 14px rgba(15, 23, 42, .06);
}

.frontend-topbar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 5%;
    background: #20262b;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    overflow-x: auto;
}

.frontend-topbar a {
    color: #fff;
    white-space: nowrap;
}

.admin-bar-button {
    border: 0;
    background: transparent;
    color: #fff;
    padding: 0;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.frontend-mainbar {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 22px 5%;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--heading);
}

.brand-lockup small,
.admin-brand small {
    display: block;
}

.frontend-nav {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    font-weight: 700;
}

.frontend-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 14px;
    color: var(--heading);
    background: #fff;
    font-weight: 800;
}

.cart-button strong {
    display: grid;
    min-width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #8a9499;
    font-weight: 800;
}

.language-switcher a {
    color: #8a9499;
}

.language-switcher a.active {
    color: var(--heading);
}

.frontend-customizer {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(390px, 100vw);
    z-index: 90;
    background: #f0f0f1;
    border-right: 1px solid #c3c4c7;
    box-shadow: 10px 0 28px rgba(0, 0, 0, .18);
    overflow: auto;
}

.frontend-customizer form {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.customizer-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    border-bottom: 1px solid #c3c4c7;
    padding: 14px 16px;
}

.customizer-header h2 {
    font-family: "Source Sans 3", sans-serif;
    font-size: 20px;
    margin: 0;
}

.customizer-panel {
    background: #fff;
    border-bottom: 1px solid #dcdcde;
    padding: 0;
}

.customizer-panel summary {
    cursor: pointer;
    font-weight: 800;
    padding: 14px 16px;
}

.customizer-panel label {
    display: grid;
    gap: 6px;
    padding: 0 16px 14px;
    font-weight: 700;
}

.customizer-panel input,
.customizer-panel select,
.customizer-panel textarea {
    width: 100%;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    padding: 8px;
    font: inherit;
}

.customizer-panel textarea {
    min-height: 130px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
}

.customizer-actions {
    position: sticky;
    bottom: 0;
    display: grid;
    gap: 10px;
    background: #fff;
    border-top: 1px solid #c3c4c7;
    margin-top: auto;
    padding: 14px 16px;
}

.logo {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #344c58;
    color: #a6e36a;
    font-weight: 800;
    border: 4px solid #79bd5a;
}

.logo-image {
    width: 200px;
    max-width: 100%;
    height: auto;
    display: block;
}

.hero {
    min-height: 460px;
    display: grid;
    place-items: center;
    text-align: center;
    color: #fff;
    background:
        linear-gradient(rgba(6, 20, 14, .62), rgba(6, 20, 14, .62)),
        var(--hero-bg-image),
        radial-gradient(circle at center, #5d6f43, #172216 70%);
    background-size: cover;
    background-position: center;
    padding: 60px 20px;
}

.hero h1 {
    color: #fff;
    font-family: "Source Sans 3", sans-serif;
    text-transform: uppercase;
    font-size: 46px;
}

.hero p {
    max-width: 780px;
    margin: 0 auto 20px;
    font-size: 22px;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}

.home-hero {
    min-height: 560px;
    position: relative;
}

.home-hero-inner {
    width: min(980px, 92%);
    margin: 0 auto;
}

.home-hero .eyebrow {
    color: #b9f38c;
}

.home-intro-band {
    background: #fff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.home-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    gap: 32px;
    align-items: center;
}

.home-section {
    display: grid;
    gap: 18px;
}

.section-heading {
    display: grid;
    gap: 4px;
    margin-top: 14px;
}

.feature-grid {
    align-items: stretch;
}

.feature-card {
    display: flex;
    flex-direction: column;
}

.feature-card .button {
    width: fit-content;
    margin-top: auto;
}

.container {
    width: min(var(--container-width, 1200px), 90%);
    margin: 0 auto;
    padding: 44px 0;
}

.narrow { max-width: 540px; }

.grid, .stats, .dashboard-stats, .dashboard-panels {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 18px;
    margin-bottom: 32px;
}

.card, .stat, .form, .dashboard-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
}

.content-detail {
    display: grid;
    gap: 24px;
}

.content-detail h1 {
    font-size: 48px;
}

.public-page-header,
.account-hero,
.registry-hero {
    background:
        radial-gradient(circle at 12% 20%, rgba(84, 180, 53, .16), transparent 32%),
        linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(237, 251, 226, .78));
    border-bottom: 1px solid var(--border);
    padding: 62px 0 42px;
}

.narrow-content {
    width: min(900px, 90%);
}

.public-content-body {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    font-size: 18px;
}

.public-content-body > *:first-child {
    margin-top: 0;
}

.public-featured-image {
    margin-bottom: 12px;
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 32px;
    align-items: start;
}

.contact-cards {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.contact-form-card {
    position: sticky;
    top: 148px;
}

.portal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.portal-nav a {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--heading);
    font-weight: 800;
    padding: 8px 14px;
}

.portal-nav a.active,
.portal-nav a:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--primary-button-text, #fff);
}

.account-dashboard,
.registry-portal {
    display: grid;
    gap: 24px;
}

.registry-local-menu {
    max-width: 1100px;
}

.lead {
    max-width: 860px;
    font-size: 22px;
    font-weight: 700;
    color: #4a5a61;
}

.featured-image {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #eef5ea;
}

.content-body,
.content-block {
    background: var(--content-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
}

.course-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.course-meta-grid strong,
.course-meta-grid span {
    display: block;
}

.course-chapter {
    background: var(--content-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin: 18px 0;
    padding: 20px;
}

.lesson-list {
    display: grid;
    gap: 10px;
    padding-left: 22px;
}

.lesson-list li {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f8fff3;
}

.lesson-list small {
    display: block;
    color: #66757c;
    font-weight: 700;
}

.course-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.progress-bar {
    height: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #edfbe2;
}

.progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.quiz-question {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    background: #f8fff3;
}

.quiz-question legend {
    padding: 0 8px;
    color: var(--heading);
    font-weight: 800;
}

.choice-row {
    display: flex;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
    font-weight: 600;
}

.choice-row input {
    width: auto;
    margin: 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 18px;
    align-items: start;
}

.product-purchase-box {
    position: sticky;
    top: 150px;
}

.price {
    color: var(--focus);
    font-size: 34px;
    font-weight: 800;
}

.data-preview {
    max-height: 360px;
    overflow: auto;
    border-radius: 8px;
    background: #f3f7f1;
    padding: 14px;
    white-space: pre-wrap;
}

.media-card {
    margin: 0;
}

.media-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    background: #eef5ea;
}

.media-card figcaption {
    display: grid;
    gap: 4px;
    margin-top: 10px;
}

.media-card span {
    color: var(--accent-dark);
    font-weight: 800;
}

.dashboard-card {
    min-height: 150px;
    border-color: #263238;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.dashboard-card strong, .stat strong {
    display: block;
    font-size: 36px;
    color: #000;
}

.analytics-dashboard {
    display: grid;
    gap: 22px;
    margin-top: 24px;
}

.compact-table table {
    min-width: 0;
}

.analytics-bars {
    display: grid;
    gap: 10px;
}

.analytics-bar-row {
    display: grid;
    grid-template-columns: 110px minmax(80px, 1fr) 120px;
    gap: 10px;
    align-items: center;
}

.analytics-bar-row strong {
    display: block;
    min-width: 36px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-dark));
    color: var(--primary-button-text, #fff);
    padding: 4px 10px;
    font-size: 13px;
    text-align: right;
}

.analytics-bar-row small {
    color: #617077;
    font-weight: 700;
}

.form {
    display: grid;
    gap: 14px;
}

label { display: grid; gap: 6px; font-weight: 700; }

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px;
    font: inherit;
}

.error { color: #b42318; font-weight: 700; }
.site-footer {
    background: var(--footer-bg, var(--accent));
    color: #fff;
    padding: 42px 5% 22px;
    display: grid;
    gap: 24px;
}

.site-footer a,
.site-footer button {
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, minmax(160px, 1fr));
    gap: 28px;
    text-align: left;
}

.footer-grid section {
    display: grid;
    gap: 8px;
    align-content: start;
}

.footer-grid h3 {
    color: #fff;
    font-family: "Source Sans 3", sans-serif;
    font-size: 18px;
    margin: 0;
}

.link-button {
    border: 0;
    padding: 0;
    background: transparent;
    justify-content: flex-start;
    font-weight: 700;
}

.copyright {
    display: block;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, .28);
    padding-top: 18px;
}

.consent-banner {
    position: fixed;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 60;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 18px;
}

.consent-banner h2 {
    font-family: "Source Sans 3", sans-serif;
    font-size: 24px;
    margin: 0 0 8px;
}

.consent-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
    background: #f0f0f1;
}

.admin-sidebar {
    background: #1d2327;
    border-right: 1px solid #2c3338;
    color: #f0f0f1;
    padding: 0;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow: auto;
}

.admin-brand {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 18px 16px;
    border-bottom: 1px solid #2c3338;
    margin-bottom: 8px;
}

.admin-brand strong,
.admin-brand small {
    color: #f0f0f1;
}

.admin-sidebar nav {
    display: grid;
    gap: 0;
}

.admin-sidebar a {
    padding: 9px 16px;
    border-left: 4px solid transparent;
    color: #c3c4c7;
    font-weight: 700;
}

.admin-sidebar a:hover {
    background: #2c3338;
    border-left-color: var(--accent);
    color: #fff;
}

.admin-user {
    margin: 18px 12px;
    border-radius: 4px;
    background: #2c3338;
    padding: 12px;
    color: #fff;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: #fff;
    border-bottom: 1px solid #c3c4c7;
    padding: 16px 28px;
}

.admin-content {
    padding: 28px;
}

.admin-content .card,
.admin-content .table-wrap,
.admin-content .cms-form .form-section {
    border-color: #c3c4c7;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
}

.admin-content h2 {
    font-family: "Source Sans 3", sans-serif;
    font-size: 26px;
}
.eyebrow { color: var(--accent-dark); text-transform: uppercase; letter-spacing: .16em; font-weight: 800; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--border); padding: 12px; text-align: left; }
th { background: #f7fff2; }
.pill { display: inline-flex; border-radius: 999px; padding: 3px 9px; background: #edfbe2; color: var(--focus); font-weight: 700; }
.pill-ok { background: #e9f8df; color: #245213; }
.pill-warning { background: #fff7d6; color: #8a5a00; }
.pill-error { background: #fde8e8; color: #b42318; }
.notice {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    background: #fff;
}
.danger-notice {
    border-color: #f2b8b5;
    background: #fff5f5;
    color: #7a271a;
}
.first-run-hero {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 24px;
}
.first-run-form textarea {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
}
.source-references {
    margin-top: 28px;
}
.source-list {
    display: grid;
    gap: 12px;
    background: var(--content-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 22px 22px 22px 42px;
}
.source-list li {
    padding-left: 6px;
}
.source-list span,
.source-list small {
    display: block;
}

@media (max-width: 900px) {
    .frontend-mainbar, .admin-shell, .footer-grid, .consent-banner, .detail-grid, .home-intro-grid, .contact-grid { grid-template-columns: 1fr; }
    .frontend-nav { justify-content: flex-start; }
    .frontend-actions { justify-content: flex-start; }
    .admin-sidebar { height: auto; position: static; }
    .product-purchase-box { position: static; }
    .contact-form-card { position: static; }
    .content-detail h1 { font-size: 36px; }
}

.cms-form {
    display: grid;
    gap: 18px;
}

.editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.form-section {
    display: grid;
    gap: 14px;
}

.form-section label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.form-section textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px;
    font: inherit;
}

.large-textarea {
    min-height: 260px !important;
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    position: sticky;
    bottom: 0;
    background: #f0f0f1;
    border-top: 1px solid var(--border);
    padding: 14px 0;
}

.actions form {
    margin: 0;
}

.inline-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(110px, 1fr)) auto;
    gap: 8px;
    align-items: center;
}

.compact-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    align-items: end;
}

.compact-form textarea,
.inline-form textarea {
    min-height: 84px;
}

.menu-builder {
    display: grid;
    gap: 12px;
}

.menu-builder-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.menu-items {
    display: grid;
    gap: 10px;
}

.menu-item-row {
    display: grid;
    grid-template-columns: 60px repeat(3, minmax(120px, 1fr)) auto auto auto;
    gap: 8px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    background: #fbfff8;
}

.drag-handle {
    color: #60706a;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.media-picker-preview {
    min-height: 44px;
}

.media-preview-frame {
    display: grid;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfff8;
    padding: 10px;
}

.media-preview-frame img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 6px;
    background: #eef5ea;
}

.media-preview-frame small {
    overflow-wrap: anywhere;
    color: #60706a;
}

.research-media-builder,
.research-media-items {
    display: grid;
    gap: 12px;
}

.research-media-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) minmax(150px, .8fr) minmax(140px, 1fr) auto;
    gap: 8px;
    align-items: start;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    background: #fbfff8;
}

.research-media-row .media-picker-preview {
    grid-column: 1 / -1;
}

button.danger,
.button.danger {
    background: #b42318;
    border-color: #b42318;
    color: #fff;
}

@media (max-width: 1000px) {
    .editor-grid {
        grid-template-columns: 1fr;
    }

    .menu-item-row {
        grid-template-columns: 1fr;
    }
}

.checkbox-label {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfff8;
    font-weight: 600;
}

.checkbox-label input {
    width: auto;
    margin-top: 4px;
}

.checkbox-label small {
    display: block;
    color: #60706a;
    font-weight: 400;
}

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

.clean-list li {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    background: #f8fff5;
}

.clean-list span {
    display: block;
    color: #60706a;
}

.academy-hero,
.academy-detail-hero {
    padding-top: 70px;
    padding-bottom: 52px;
}

.academy-hero h1,
.academy-detail-hero h1 {
    color: var(--accent-dark);
    font-size: clamp(46px, 6vw, 74px);
}

.academy-band {
    background: var(--site-bg);
    padding: 46px 0 70px;
}

.academy-category-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 40px;
}

.academy-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 20px 70px;
    color: var(--heading);
    font-size: 20px;
}

.academy-filter-bar {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    border: 1px solid #1f2933;
    border-radius: 14px 14px 0 0;
    padding: 20px;
    background: #fff;
    margin-bottom: 32px;
}

.academy-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 420px));
    gap: 28px;
}

.academy-course-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
}

.academy-card-image,
.academy-detail-image {
    min-height: 300px;
    display: grid;
    place-items: center;
    background:
        linear-gradient(rgba(20, 60, 28, .12), rgba(20, 60, 28, .12)),
        radial-gradient(circle at 20% 30%, #7fb069, transparent 35%),
        linear-gradient(135deg, #314f32, #b9d79a);
    color: #fff;
    font-weight: 800;
}

.academy-card-body {
    padding: 26px;
}

.academy-card-body h2 {
    font-family: "Source Sans 3", sans-serif;
    font-size: 28px;
}

.academy-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid #1f2933;
    margin-top: 20px;
    padding-top: 20px;
    color: var(--heading);
}

.academy-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 44px;
    align-items: start;
}

.academy-detail-image {
    border-radius: 14px;
    margin-bottom: 34px;
}

.academy-course-sidebar {
    position: sticky;
    top: 150px;
}

.academy-details-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 28px;
}

.academy-price {
    display: block;
    color: var(--heading);
    font-size: 34px;
    line-height: 1;
    margin-bottom: 10px;
}

.academy-details-card .button,
.academy-details-card button {
    width: 100%;
    margin: 18px 0 12px;
}

.academy-details-card small {
    display: block;
    text-align: center;
    color: #55708a;
    margin-bottom: 22px;
}

.academy-details-card dl {
    display: grid;
    gap: 14px;
    border-top: 1px solid var(--border);
    margin: 22px -28px -28px;
    padding: 24px 28px 28px;
    background: #fbfcfd;
}

.academy-details-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.academy-details-card dd {
    margin: 0;
    font-weight: 800;
    color: var(--heading);
}

.academy-tabs-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.academy-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    border-bottom: 1px solid var(--border);
    padding: 0 22px;
}

.academy-tabs a {
    padding: 20px 0;
    color: #3d5260;
    font-weight: 800;
    border-bottom: 2px solid transparent;
}

.academy-tabs a.active {
    color: var(--accent-dark);
    border-bottom-color: var(--accent);
}

.academy-tab-panel {
    padding: 34px;
}

.frontend-form {
    display: grid;
    gap: 14px;
    margin: 0 0 22px;
}

.academy-note,
.academy-resource {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfff8;
    padding: 18px;
    margin: 0 0 14px;
}

.academy-note h3,
.academy-resource h3 {
    font-family: "Source Sans 3", sans-serif;
    font-size: 20px;
    margin-bottom: 6px;
}

.academy-note blockquote {
    margin: 12px 0 0;
    border-left: 4px solid var(--accent);
    padding-left: 14px;
    color: var(--heading);
}

.academy-resource {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.shop-flow-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

.cart-list {
    display: grid;
    gap: 14px;
}

.cart-row {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) 130px 120px;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    background: #fbfff8;
}

.cart-row img,
.cart-thumb {
    width: 88px;
    height: 88px;
    border-radius: 8px;
    object-fit: cover;
}

.checkout-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

.add-to-cart-form,
.card-cart-form {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.add-to-cart-form label {
    margin: 0;
}

.media-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-bottom: 34px;
}

.media-admin-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    display: grid;
    gap: 12px;
}

.protected-media-frame,
.media-file-placeholder {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 180px;
    overflow: hidden;
    border-radius: 10px;
    background: #eef7ea;
    border: 1px solid var(--border);
}

.protected-media-frame img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.watermark-preview-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(-35deg, rgba(255,255,255,.08), rgba(255,255,255,.08) 12px, rgba(15,23,42,.08) 12px, rgba(15,23,42,.08) 24px);
    pointer-events: none;
}

.watermark-label {
    position: absolute;
    inset: auto 12px 12px auto;
    z-index: 1;
    border-radius: 999px;
    background: rgba(32, 38, 43, .82);
    color: #fff;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
}

.academy-admin-shell {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
}

.academy-subnav {
    display: grid;
    gap: 8px;
    align-content: start;
}

.academy-subnav a {
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--heading);
}

.academy-subnav a.active,
.academy-subnav a:hover {
    background: #e9fbdf;
    color: var(--focus);
}

.academy-admin-list {
    display: grid;
    gap: 18px;
}

.academy-admin-row {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    align-items: center;
    gap: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    padding: 28px 24px;
}

.academy-admin-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: #e9fbdf;
    color: var(--accent-dark);
    font-weight: 800;
}

@media (max-width: 900px) {
    .academy-category-grid,
    .academy-filter-bar,
    .academy-detail-grid,
    .academy-admin-shell {
        grid-template-columns: 1fr;
    }

    .academy-course-sidebar {
        position: static;
    }
}

.listing-hero,
.detail-hero {
    background: linear-gradient(135deg, rgba(84, 180, 53, .16), rgba(255, 255, 255, .9));
    border-bottom: 1px solid var(--border);
    padding: 62px 0 46px;
}

.listing-hero h1,
.detail-hero h1 {
    font-size: clamp(42px, 6vw, 72px);
    margin-bottom: 12px;
}

.listing-section {
    padding-top: 42px;
}

.frontend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.frontend-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100%;
    background: var(--content-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .07);
}

.module-card-image,
.detail-featured-image {
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.module-card-image {
    aspect-ratio: 16 / 10;
    margin: -22px -22px 8px;
    width: calc(100% + 44px);
    border-radius: 14px 14px 0 0;
}

.placeholder-image {
    display: grid;
    place-items: center;
    min-height: 220px;
    background:
        linear-gradient(rgba(15, 23, 42, .25), rgba(15, 23, 42, .25)),
        radial-gradient(circle at 25% 30%, rgba(84, 180, 53, .55), transparent 32%),
        linear-gradient(135deg, #23352f, #8fbd74);
    color: #fff;
    font-weight: 800;
    text-align: center;
}

.module-card .button {
    margin-top: auto;
    width: fit-content;
}

.product-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.detail-hero-grid,
.detail-layout,
.product-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 42px;
    align-items: start;
}

.detail-featured-image {
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow);
}

.rich-content-card,
.detail-sidebar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
}

.detail-layout,
.detail-grid,
.species-facts {
    margin-top: 42px;
}

.species-facts {
    display: grid;
    gap: 22px;
}

.data-preview {
    overflow: auto;
    max-height: 360px;
    padding: 16px;
    border-radius: 10px;
    background: #0f172a;
    color: #e8fff0;
}

.media-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    background: #edfbe2;
}

.product-purchase-box {
    position: sticky;
    top: 130px;
}

.fulfilment-list {
    display: grid;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.fulfilment-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.fulfilment-list dd {
    margin: 0;
    font-weight: 800;
    color: var(--heading);
}

.thp-block-editor {
    display: grid;
    gap: 14px;
    margin-top: 10px;
}

.thp-block-editor .eyebrow {
    margin-bottom: 2px;
}

.block-editor-header,
.reusable-panel-header,
.editor-block-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.block-editor-actions,
.editor-block-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.block-toolbar,
.block-library-panel,
.reusable-panel {
    position: sticky;
    top: 84px;
    z-index: 4;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    box-shadow: var(--shadow);
}

.block-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.block-toolbar[hidden],
.block-library-panel[hidden],
.reusable-panel[hidden] {
    display: none;
}

.block-toolbar button {
    padding: 7px 10px;
}

.underline {
    text-decoration: underline;
}

.block-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 8px;
}

.block-editor-canvas {
    display: grid;
    gap: 14px;
    min-height: 260px;
    border: 1px dashed var(--accent);
    border-radius: 14px;
    background: #fbfff8;
    padding: 16px;
}

.gutenberg-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 16px;
    align-items: start;
}

.block-settings-panel {
    position: sticky;
    top: 84px;
    display: grid;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    box-shadow: var(--shadow);
}

.block-settings-panel h4 {
    margin: 0;
}

.block-settings-panel hr {
    width: 100%;
    border: 0;
    border-top: 1px solid var(--border);
}

.editor-block {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .05);
}

.editor-block.is-dragging {
    opacity: .55;
}

.editor-block.is-selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(84, 180, 53, .18), 0 2px 8px rgba(15, 23, 42, .05);
}

.editor-block-topbar {
    background: #f2faee;
    border-bottom: 1px solid var(--border);
    padding: 9px 12px;
}

.drag-handle {
    cursor: grab;
    color: var(--accent-dark);
    font-weight: 800;
}

.editor-block-body {
    min-height: 54px;
    padding: 18px;
    outline: none;
}

.editor-block-body:focus {
    box-shadow: inset 0 0 0 2px rgba(84, 180, 53, .18);
}

.editor-block-body h1,
.editor-block-body h2,
.editor-block-body h3,
.editor-block-body p,
.editor-block-body ul,
.editor-block-body ol,
.editor-block-body blockquote {
    margin-top: 0;
}

.editor-block-body table {
    width: 100%;
    border-collapse: collapse;
}

.editor-block-body th,
.editor-block-body td {
    border: 1px solid var(--border);
    padding: 8px;
}

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

.thp-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.thp-gallery img,
.thp-media-text img,
.editor-block-body figure img {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.thp-media-text {
    display: grid;
    grid-template-columns: minmax(180px, .8fr) minmax(0, 1.2fr);
    gap: 22px;
    align-items: center;
}

.file-block,
.dynamic-block,
.shortcode-block,
.embed-block,
.research-chart-block,
.research-timeline-block,
.research-methods-block,
.research-dataset-block,
.research-gallery-block,
.species-genetics-block {
    display: block;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fbfff8;
    padding: 14px;
}

.research-timeline-block ol {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.research-timeline-block li {
    border-left: 4px solid var(--accent);
    padding: 10px 0 10px 14px;
}

.research-timeline-block li span,
.research-methods-block article p {
    display: block;
    color: var(--muted);
}

.research-methods-block > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.research-methods-block article,
.research-dataset-block table,
.research-gallery-block .thp-gallery {
    margin-top: 12px;
}

.research-methods-block article,
.data-row,
.mini-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    padding: 14px;
}

.research-dataset-block table {
    width: 100%;
    border-collapse: collapse;
}

.research-dataset-block th,
.research-dataset-block td,
.species-genetics-block th,
.species-genetics-block td {
    border-bottom: 1px solid var(--border);
    padding: 10px;
    text-align: left;
}

.species-genetics-block table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
}

.species-genetics-block small {
    display: block;
    color: var(--muted);
}

.research-type-grid,
.structured-data-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.mini-card {
    display: grid;
    gap: 4px;
}

.mini-card span,
.timeline-date {
    color: var(--muted);
}

.data-row {
    display: grid;
    gap: 6px;
}

.data-row strong {
    color: var(--heading);
}

.publication-list {
    margin: 0;
    padding-left: 18px;
}

.publication-list li {
    margin-bottom: 8px;
}

.icon-block,
.social-icons-block {
    font-weight: 800;
    color: var(--accent-dark);
}

.thp-group,
.thp-cover-block {
    border-radius: 12px;
    padding: 24px;
    background: var(--site-bg);
}

.thp-cover-block {
    min-height: 220px;
    display: grid;
    align-content: center;
    background:
        linear-gradient(rgba(15, 23, 42, .45), rgba(15, 23, 42, .45)),
        radial-gradient(circle at 20% 30%, rgba(84, 180, 53, .7), transparent 35%),
        linear-gradient(135deg, #213b32, #79bd5a);
    color: #fff;
}

.thp-cover-block h2 {
    color: #fff;
}

.inline-plus {
    width: 100%;
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    background: #fbfff8;
    color: var(--accent-dark);
}

.reusable-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.reusable-item {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto auto auto;
    gap: 8px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    background: #fbfff8;
}

.block-editor-output {
    display: none;
}

.install-shell {
    min-height: 100vh;
    display: grid;
    place-items: start center;
    background: var(--site-bg);
    padding: 48px 20px;
}

.install-panel {
    width: min(980px, 100%);
    display: grid;
    gap: 22px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    box-shadow: var(--shadow);
}

.install-form {
    max-width: none;
}

.error-card {
    border-color: #f3b4ae;
    background: #fff7f6;
}

.warning-card {
    border-color: #f8d98b;
    background: #fffaf0;
}

.pedigree-tree,
.pedigree-tree ol {
    list-style: none;
    margin: 0;
    padding-left: 22px;
}

.pedigree-tree > li {
    padding-left: 0;
}

.pedigree-parents {
    display: grid;
    gap: 10px;
    margin-top: 10px;
    border-left: 2px solid var(--border);
}

.pedigree-node,
.pedigree-empty {
    display: grid;
    gap: 4px;
    background: #fbfff8;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
}

.pedigree-node small {
    color: #5b6b72;
}

.registry-thumb {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-right: 10px;
    vertical-align: middle;
}

.certificate-builder {
    display: grid;
    grid-template-columns: 280px 220px minmax(620px, 1fr);
    gap: 18px;
    align-items: stretch;
    overflow-x: auto;
}

.certificate-builder-panel,
.certificate-elements {
    background: #20232d;
    color: #fff;
    border-radius: 8px;
    padding: 18px;
}

.certificate-builder-panel h3,
.certificate-elements h3 {
    color: #fff;
}

.certificate-builder-panel label {
    color: #e8edf0;
}

.certificate-elements {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-content: start;
}

.certificate-elements button {
    min-height: 48px;
    justify-content: flex-start;
    background: #42485a;
    color: #fff;
    border-color: #596175;
}

.certificate-stage-wrap,
.certificate-public-frame {
    overflow: auto;
    padding: 32px;
    background: #f0f1f3;
    border-radius: 8px;
}

.certificate-stage,
.certificate-canvas {
    position: relative;
    flex: 0 0 auto;
    margin: 0 auto;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .16);
    background-image: repeating-linear-gradient(90deg, rgba(84, 180, 53, .025) 0 8px, transparent 8px 16px);
    overflow: hidden;
}

.certificate-side-band {
    position: absolute;
    inset: 0 auto 0 0;
    width: 42px;
    background: var(--certificate-accent, #54B435);
}

.certificate-builder-field,
.certificate-field {
    position: absolute;
    display: grid;
    place-items: center;
    padding: 6px;
    border: 1px dashed rgba(84, 180, 53, .55);
    background: rgba(255, 255, 255, .78);
    color: #0f172a;
    font-family: "Source Sans 3", sans-serif;
    text-align: center;
    line-height: 1.2;
}

.certificate-builder-field {
    cursor: move;
}

.certificate-builder-field:hover {
    border-style: solid;
    box-shadow: 0 0 0 3px rgba(84, 180, 53, .18);
}

.certificate-builder-field-animal_name {
    font-family: "Source Serif 4", serif;
    font-weight: 700;
}

.certificate-qr,
.certificate-builder-field-qr {
    background: #fff;
    border: 8px solid #fff;
    outline: 1px solid #d8dee3;
}

.certificate-qr small {
    display: block;
    overflow: hidden;
    max-width: 100%;
    font-size: 9px;
}

.certificate-logo-field,
.certificate-builder-field-logo {
    border: 0;
    background: transparent;
    font-weight: 800;
}

.certificate-logo-field img {
    max-width: 100%;
    max-height: 100%;
}

.certificate-badge,
.certificate-builder-field-badge {
    border-radius: 999px;
    background: rgba(84, 180, 53, .18);
    color: var(--certificate-accent, #54B435);
    border: 10px solid rgba(84, 180, 53, .25);
    font-size: 38px !important;
    font-weight: 800;
}

.certificate-badge small {
    display: block;
    color: #5f6b70;
    font-size: 10px;
}

.backup-actions,
.backup-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.backup-actions form,
.backup-module-grid form {
    background: #fbfff8;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
}

.backup-actions h4,
.backup-module-grid h4 {
    margin: 0 0 8px;
    color: var(--heading);
    font-family: "Source Serif 4", serif;
    font-size: 22px;
}

.backup-module-grid p {
    min-height: 72px;
    color: #56666d;
    font-size: 14px;
}

.compact-form {
    max-width: 720px;
    margin-top: 16px;
}

.restore-preview {
    margin-top: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfff8;
    padding: 18px;
}

.author-avatar {
    width: 96px;
    height: 96px;
    border-radius: 999px;
    object-fit: cover;
    border: 4px solid var(--border);
}

@media (max-width: 900px) {
    .detail-hero-grid,
    .detail-layout,
    .product-detail-grid,
    .gutenberg-shell,
    .thp-columns,
    .thp-media-text,
    .reusable-item {
        grid-template-columns: 1fr;
    }

    .block-settings-panel {
        position: static;
    }

    .product-purchase-box {
        position: static;
    }
}
