/* =========================================================
   GLOBAL
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    padding-top: 78px;
    display: flex;
    flex-direction: column;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: #1d2a22;
    background: #f6faf7;
}

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

img,
video {
    display: block;
    max-width: 100%;
}

.page {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    flex: 1;
}

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(40, 90, 55, 0.12);
    backdrop-filter: blur(12px);
}

.site-nav {
    max-width: 1380px;
    height: 78px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-logo {
    font-weight: 700;
    color: #1e5635;
    white-space: nowrap;
}

.nav-links {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 0.35rem;
}

.nav-links a {
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    font-size: 0.95rem;
    color: #33463a;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ffffff;
    background: #2e7d4f;
}

/* =========================================================
   HEADER ADMIN ICON
   ========================================================= */

.admin-login-link {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: rgba(46, 125, 79, 0.08);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.admin-login-link:hover {
    background: rgba(46, 125, 79, 0.18);
    transform: scale(1.05);
}

.admin-login-link img {
    width: 18px;
    height: 18px;
    display: block;
    object-fit: contain;
    opacity: 0.72;
}

.admin-login-link:hover img {
    opacity: 1;
}

.site-logo {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 800px) {
    .site-logo {
        max-width: calc(100% - 55px);
    }
}

/* =========================================================
   HERO
   ========================================================= */

.hero-section,
.topic-hero {
    min-height: 360px;
    padding: 4rem 2.5rem;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
            radial-gradient(circle at top left, rgba(87, 170, 98, 0.25), transparent 35%),
            linear-gradient(135deg, #ffffff, #eef8f0);
    box-shadow: 0 18px 45px rgba(31, 74, 42, 0.08);
}

.hero-content {
    max-width: 920px;
}

.hero-kicker,
.section-label {
    display: inline-block;
    margin-bottom: 0.9rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2e7d4f;
}

.hero-section h1,
.topic-hero h1 {
    margin: 0 0 1.3rem;
    font-size: clamp(2.2rem, 5vw, 4.8rem);
    line-height: 1.05;
    color: #173825;
}

.hero-description,
.topic-hero p {
    max-width: 780px;
    margin: 0;
    font-size: 1.15rem;
    color: #41574a;
}

/* =========================================================
   CONTENT SECTIONS
   ========================================================= */

.content-section,
.definition-card {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(46, 125, 79, 0.12);
    box-shadow: 0 12px 32px rgba(31, 74, 42, 0.06);
}

.content-section h2,
.section-heading h2,
.definition-card h2 {
    margin-top: 0;
    color: #173825;
}

.content-section p,
.section-heading p,
.definition-card p {
    color: #405348;
}

/* =========================================================
   QUESTIONS HOME
   ========================================================= */

.questions-section {
    margin-top: 3rem;
}

.section-heading {
    margin-bottom: 1.4rem;
}

.questions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.question-card {
    min-height: 190px;
    padding: 1.5rem;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid rgba(46, 125, 79, 0.12);
    box-shadow: 0 12px 28px rgba(31, 74, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.question-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 42px rgba(31, 74, 42, 0.12);
}

.question-number {
    width: 42px;
    height: 42px;
    margin-bottom: 1rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffffff;
    background: #2e7d4f;
}

.question-card h3 {
    margin: 0 0 1rem;
    color: #173825;
    font-size: 1.15rem;
}

.question-card p {
    margin: 0;
    font-size: 0.92rem;
    color: #6a7d70;
}

/* =========================================================
   TOPIC PAGES
   ========================================================= */

.topic-page {
    padding-bottom: 4rem;
}

.definitions-grid {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.definitions-grid .definition-card {
    margin-top: 0;
    min-height: 360px;
}

.definition-card {
    position: relative;
    overflow: hidden;
    scroll-margin-top: 110px;
}

.definition-content {
    position: relative;
    z-index: 2;
}

.definition-header {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    margin-bottom: 1rem;
}

.definition-number {
    min-width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #2e7d4f;
    font-weight: 700;
}

.keywords {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.keywords span {
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.82rem;
    color: #2e7d4f;
    background: rgba(46, 125, 79, 0.1);
}

/* =========================================================
   SECTION BACKGROUND MEDIA
   ========================================================= */

.definition-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.definition-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.18;
    filter: saturate(0.9) contrast(1.05);
}

.has-background-image {
    background: #ffffff;
}

.has-background-image::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
            linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78)),
            radial-gradient(circle at top right, rgba(46, 125, 79, 0.12), transparent 40%);
}

.page-video {
    width: 100%;
    margin-top: 1.5rem;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(31, 74, 42, 0.12);
}

.media-grid {
    margin-top: 1.5rem;
    display: grid;
    gap: 1rem;
}

@media (min-width: 800px) {
    .media-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================================
   TARGET HIGHLIGHT EFFECT
   ========================================================= */

.definition-card.highlight-section {
    animation: sectionGlow 2.4s ease-out;
}

@keyframes sectionGlow {
    0% {
        box-shadow:
                0 0 0 0 rgba(46, 125, 79, 0.35),
                0 12px 32px rgba(31, 74, 42, 0.06);
        background: #ffffff;
        transform: scale(1);
    }

    18% {
        box-shadow:
                0 0 0 8px rgba(46, 125, 79, 0.16),
                0 0 35px rgba(46, 125, 79, 0.28),
                0 18px 42px rgba(31, 74, 42, 0.14);
        background: #f3fbf5;
        transform: scale(1.012);
    }

    55% {
        box-shadow:
                0 0 0 4px rgba(46, 125, 79, 0.10),
                0 0 24px rgba(46, 125, 79, 0.16),
                0 14px 36px rgba(31, 74, 42, 0.10);
        background: #f8fdf9;
    }

    100% {
        box-shadow: 0 12px 32px rgba(31, 74, 42, 0.06);
        background: #ffffff;
        transform: scale(1);
    }
}

/* =========================================================
   ADMIN
   ========================================================= */

.admin-form {
    max-width: 420px;
    display: grid;
    gap: 0.8rem;
}

.admin-form label {
    font-weight: 600;
    color: #173825;
}

.admin-form input {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(46, 125, 79, 0.25);
    border-radius: 12px;
    font-size: 1rem;
    background: #ffffff;
}

.admin-form input:focus {
    outline: none;
    border-color: #2e7d4f;
    box-shadow: 0 0 0 3px rgba(46, 125, 79, 0.12);
}

.admin-form button {
    margin-top: 0.8rem;
    padding: 0.8rem 1.1rem;
    border: none;
    border-radius: 999px;
    color: #ffffff;
    background: #2e7d4f;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.admin-form button:hover {
    background: #23643f;
    transform: translateY(-2px);
}

.admin-error {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    color: #8a1f1f;
    background: #ffe9e9;
    border: 1px solid #ffc7c7;
}

.admin-links-grid {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.admin-links-grid a {
    padding: 1rem;
    border-radius: 16px;
    color: #1e5635;
    background: rgba(46, 125, 79, 0.08);
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.admin-links-grid a:hover {
    background: rgba(46, 125, 79, 0.16);
    transform: translateY(-2px);
}

.admin-logout-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    color: #ffffff;
    background: #2e7d4f;
    font-weight: 600;
}

.admin-logout-link:hover {
    background: #23643f;
}

/* =========================================================
   ADMIN EDIT MENU
   ========================================================= */

.editable-zone {
    position: relative;
}

.admin-edit-menu {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 50;
}

.admin-edit-toggle {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #59645d;
    background: #e5e9e6;
    box-shadow: 0 8px 18px rgba(31, 74, 42, 0.12);
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
    transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.admin-edit-toggle:hover {
    color: #1e5635;
    background: #dce4df;
    transform: scale(1.06);
}

.admin-edit-dropdown {
    position: absolute;
    top: 44px;
    right: 0;
    min-width: 155px;
    padding: 0.35rem;
    border-radius: 14px;
    display: none;
    background: #ffffff;
    border: 1px solid rgba(46, 125, 79, 0.15);
    box-shadow: 0 12px 28px rgba(31, 74, 42, 0.16);
}

.admin-edit-menu.open .admin-edit-dropdown {
    display: grid;
    gap: 0.25rem;
}

.admin-edit-dropdown a {
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    color: #33463a;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.admin-edit-dropdown a:hover {
    color: #ffffff;
    background: #2e7d4f;
}

/* =========================================================
   EDITOR FORM
   ========================================================= */

.editor-form {
    display: grid;
    gap: 2rem;
}

.editor-form label {
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.4rem;
    font-weight: 700;
    color: #173825;
}

.editor-form input,
.editor-form textarea {
    width: 100%;
    padding: 0.8rem 0.95rem;
    border: 1px solid rgba(46, 125, 79, 0.25);
    border-radius: 14px;
    font-size: 1rem;
    font-family: inherit;
    color: #1d2a22;
    background: #ffffff;
}

.editor-form textarea {
    resize: vertical;
}

.editor-form input:focus,
.editor-form textarea:focus {
    outline: none;
    border-color: #2e7d4f;
    box-shadow: 0 0 0 3px rgba(46, 125, 79, 0.12);
}

.editor-top-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.editor-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 20px;
    background: #f8fbf8;
    border: 1px solid rgba(46, 125, 79, 0.16);
}

.editor-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.editor-actions button,
.secondary-button,
.save-button,
.upload-box button {
    padding: 0.55rem 0.85rem;
    border: none;
    border-radius: 999px;
    color: #ffffff;
    background: #2e7d4f;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.editor-actions button:hover,
.secondary-button:hover,
.save-button:hover,
.upload-box button:hover {
    background: #23643f;
    transform: translateY(-1px);
}

.danger-button {
    background: #b53a3a !important;
}

.danger-button:hover {
    background: #922d2d !important;
}

.save-button {
    margin-top: 2rem;
    width: 100%;
    padding: 1rem 1.2rem;
    font-size: 1rem;
}

.upload-box {
    margin-top: 1.2rem;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(46, 125, 79, 0.06);
    border: 1px dashed rgba(46, 125, 79, 0.3);
}

.upload-box p {
    margin-top: 0;
}

.media-preview-list {
    margin-top: 0.8rem;
    display: grid;
    gap: 0.4rem;
}

.media-preview-list span {
    padding: 0.5rem 0.7rem;
    border-radius: 10px;
    background: rgba(46, 125, 79, 0.08);
    color: #2e7d4f;
    font-size: 0.9rem;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    margin-top: auto;
    padding: 2rem 1.5rem;
    text-align: center;
    color: #5c6e63;
    background: #ffffff;
    border-top: 1px solid rgba(40, 90, 55, 0.12);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1000px) {
    .site-nav {
        gap: 1rem;
        padding: 0 1rem;
    }

    .nav-links a {
        padding: 0.45rem 0.65rem;
        font-size: 0.9rem;
    }

    .questions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 800px) {
    body {
        padding-top: 0;
    }

    .site-header {
        position: static;
    }

    .site-nav {
        height: auto;
        padding: 1rem;
        flex-wrap: wrap;
    }

    .site-logo {
        width: calc(100% - 80px);
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.3rem;
    }

    .hero-section,
    .topic-hero {
        min-height: auto;
        padding: 3rem 1.5rem;
    }

    .definitions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .editor-top-line,
    .editor-section-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .page {
        padding: 1.5rem 1rem;
    }

    .questions-grid,
    .admin-links-grid {
        grid-template-columns: 1fr;
    }

    .definition-header {
        flex-direction: column;
    }

    .content-section,
    .definition-card {
        padding: 1.4rem;
    }

    .hero-section h1,
    .topic-hero h1 {
        font-size: 2.2rem;
    }
}

.question-card-wrapper {
    position: relative;
}

.question-card-wrapper .question-card {
    height: 100%;
}

.question-edit-menu {
    top: 0.75rem;
    right: 0.75rem;
}

.question-card-wrapper .admin-edit-toggle {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
    background: rgba(229, 233, 230, 0.92);
}

.small-editor-link {
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    color: #ffffff;
    background: #59645d;
    font-size: 0.9rem;
    font-weight: 700;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.small-editor-link:hover {
    background: #3f4a43;
    transform: translateY(-1px);
}
/* =========================================================
   BURGER MENU
   ========================================================= */

.burger-button {
    width: 42px;
    height: 42px;
    padding: 0;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    background: rgba(46, 125, 79, 0.08);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.burger-button:hover,
.burger-button.open {
    background: rgba(46, 125, 79, 0.18);
    transform: scale(1.04);
}

.burger-button span {
    width: 19px;
    height: 2px;
    border-radius: 999px;
    background: #1e5635;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.burger-button.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger-button.open span:nth-child(2) {
    opacity: 0;
}

.burger-button.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1100px) {
    body {
        padding-top: 78px;
    }

    .site-header {
        position: fixed;
    }

    .site-nav {
        position: relative;
        height: 78px;
        padding: 0 1rem;
        flex-wrap: nowrap;
        gap: 0.75rem;
    }

    .site-logo {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
        max-width: none;
    }

    .burger-button {
        order: 2;
        display: inline-flex;
        flex: 0 0 auto;
        margin-left: auto;
    }

    .admin-login-link {
        order: 3;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 0.7rem);
        left: 1rem;
        right: 1rem;
        z-index: 1001;
        width: auto;
        padding: 0.75rem;
        border: 1px solid rgba(46, 125, 79, 0.14);
        border-radius: 22px;
        display: none;
        flex: none;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0.35rem;
        overflow: visible;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 18px 42px rgba(31, 74, 42, 0.16);
        backdrop-filter: blur(12px);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        padding: 0.75rem 0.9rem;
        text-align: left;
        font-size: 0.95rem;
    }
}

@media (max-width: 520px) {
    .site-logo {
        max-width: calc(100vw - 130px);
        font-size: 0.95rem;
    }

    .site-nav {
        padding: 0 0.75rem;
    }

    .nav-links {
        left: 0.75rem;
        right: 0.75rem;
    }
}

/* =========================================================
   INSTRUCTABLES
   ========================================================= */

.instructables-admin-bar {
    margin-top: 1.2rem;
    display: flex;
    justify-content: flex-end;
}

.instructables-grid {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.3rem;
}

.instructable-card {
    position: relative;
    min-height: 100%;
    border-radius: 24px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(46, 125, 79, 0.12);
    box-shadow: 0 12px 28px rgba(31, 74, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.instructable-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 42px rgba(31, 74, 42, 0.12);
}

.instructable-card-link {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.instructable-card-media {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, rgba(46, 125, 79, 0.18), rgba(87, 170, 98, 0.16));
}

.instructable-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.instructable-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.instructable-card-placeholder span {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #2e7d4f;
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
}

.instructable-card-content {
    padding: 1.35rem;
}

.instructable-card-content h2 {
    margin: 0 0 0.75rem;
    color: #173825;
    font-size: 1.2rem;
}

.instructable-card-content p {
    margin: 0;
    color: #405348;
    font-size: 0.95rem;
}

.empty-state-card {
    margin-top: 2rem;
}

.instructable-detail-card {
    display: grid;
    gap: 1.5rem;
}

.instructable-main-image,
.instructable-block-image {
    width: 100%;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 10px 28px rgba(31, 74, 42, 0.12);
}

.instructable-main-image {
    max-height: 520px;
}

.instructable-main-text {
    color: #405348;
    font-size: 1.05rem;
}

.instructable-blocks {
    margin-top: 2rem;
    display: grid;
    gap: 1.3rem;
}

.instructable-block-card {
    margin-top: 0;
}

.instructable-block-card h2 {
    margin-top: 0;
}

.instructable-back-link {
    margin-top: 2rem;
}

@media (max-width: 1000px) {
    .instructables-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .instructables-admin-bar {
        justify-content: flex-start;
    }
}

/* =========================================================
   ADMIN - INSTRUCTABLES SAFETY / PREVIEWS
   ========================================================= */

.editor-help-text {
    margin: 0.4rem 0 1rem;
    color: #555;
    font-size: 0.95rem;
}

.editor-image-preview {
    display: block;
    max-width: 260px;
    max-height: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0.5rem 0 0.8rem;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
    padding: 0.35rem;
}

.danger-zone-card {
    border-color: rgba(180, 0, 0, 0.25);
    background: rgba(180, 0, 0, 0.035);
}

.danger-submit-button {
    margin-top: 0.5rem;
}

/* =========================================================
   INSTRUCTABLE DETAIL EMPTY / ADMIN STATES
   ========================================================= */

.instructable-empty-zone {
    min-height: 180px;
    padding: 2rem;
    border-radius: 20px;
    display: grid;
    place-items: center;
    gap: 0.35rem;
    text-align: center;
    color: #496354;
    background: rgba(46, 125, 79, 0.055);
    border: 1px dashed rgba(46, 125, 79, 0.32);
}

.instructable-empty-zone strong {
    color: #173825;
    font-size: 1.15rem;
}

.instructable-empty-zone span {
    max-width: 520px;
    font-size: 0.95rem;
}

.instructable-empty-image-zone::before {
    content: "🖼";
    font-size: 2.5rem;
    line-height: 1;
}

.instructable-empty-text-zone {
    min-height: 140px;
}

.instructable-empty-text-zone::before {
    content: "✍";
    font-size: 2.2rem;
    line-height: 1;
}

.instructable-admin-actions .editor-actions {
    margin-top: 1rem;
}

.instructable-admin-actions .secondary-button,
.editor-actions .secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* =========================================================
   INSTRUCTABLE PDF SECTIONS / PRINT EXPORT
   ========================================================= */

.print-only {
    display: none !important;
}

.instructable-pdf-block-card p {
    margin-bottom: 1rem;
}

.instructable-pdf-carousel {
    margin-top: 1rem;
    display: grid;
    gap: 1rem;
}

.pdf-carousel-slides {
    position: relative;
}

.pdf-carousel-slide {
    display: none;
}

.pdf-carousel-slide.active {
    display: block;
}

.pdf-preview-frame {
    width: 100%;
    height: min(72vh, 680px);
    min-height: 420px;
    overflow: hidden;
    border: 1px solid rgba(46, 125, 79, 0.18);
    border-radius: 18px;
    background: #f6f8f6;
    box-shadow: 0 10px 28px rgba(31, 74, 42, 0.08);
}

.pdf-preview-frame iframe,
.pdf-preview-frame object,
.pdf-preview-frame embed {
    width: 100%;
    height: 100%;
    border: 0;
    background: #ffffff;
}

.pdf-preview-fallback {
    height: 100%;
    min-height: 260px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    color: #405348;
}

.pdf-slide-footer {
    margin-top: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.8rem;
}

.pdf-download-link {
    width: fit-content;
}

.pdf-print-download-card {
    display: none;
    padding: 1rem;
    border: 1px solid rgba(46, 125, 79, 0.22);
    border-radius: 16px;
    background: #f6f8f6;
}

.pdf-print-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    margin-right: 0.7rem;
    padding: 0.25rem 0.45rem;
    border-radius: 999px;
    background: #2e7d4f;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.pdf-print-download-link {
    display: inline-block;
    position: relative;
    z-index: 2;
    font-weight: 800;
    color: #174e30;
    text-decoration: none;
}

.pdf-carousel-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.pdf-carousel-counter {
    color: #405348;
    font-weight: 700;
}

.instructable-page-pdf-card {
    margin-top: 2rem;
}

.editor-pdf-list {
    margin: 0.8rem 0 1rem;
    padding-left: 1.2rem;
}

.editor-pdf-list a {
    color: #2e7d4f;
    font-weight: 700;
}

.instructable-empty-pdf-zone::before {
    content: "📄";
    font-size: 2.3rem;
    line-height: 1;
}

@media (max-width: 700px) {
    .pdf-preview-frame {
        height: 62vh;
        min-height: 320px;
    }

    .pdf-slide-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media print {
    body {
        padding-top: 0;
        background: #ffffff;
        color: #000000;
    }

    .site-header,
    .site-footer,
    .admin-edit-menu,
    .instructable-admin-actions,
    .instructable-page-pdf-card,
    .instructable-back-link,
    .no-print {
        display: none !important;
    }

    .page {
        max-width: none;
        padding: 0;
    }

    .topic-hero,
    .definition-card,
    .instructable-card,
    .instructable-block-card {
        box-shadow: none !important;
        border: 1px solid #d6d6d6;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .instructable-main-image,
    .instructable-block-image {
        max-height: 360px;
        object-fit: contain;
        box-shadow: none;
    }

    .pdf-carousel-slide,
    .pdf-carousel-slide.active {
        display: block !important;
        margin-bottom: 1rem;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .pdf-screen-preview {
        display: none !important;
    }

    .pdf-print-download-card {
        display: block !important;
        margin-bottom: 0.6rem;
        border: 1px solid #222222;
        box-shadow: none;
        background: #ffffff;
    }

    .pdf-print-badge {
        border: 1px solid #222222;
        background: #ffffff;
        color: #000000;
    }

    .pdf-print-download-link {
        color: #000000;
        text-decoration: underline;
        font-weight: 800;
    }

    a {
        color: #000000;
    }
}
