/* =========================================================   ControlFeed News — site styles (modernized)   ========================================================= */:root  {
        /* Surfaces & ink */    --bg:        #f6f6f8;
        --surface:   #ffffff;
        --surface-2: #fafafc;
        --ink:       #15151a;
        --ink-2:     #2a2a33;
        --muted:     #5f6470;
        --line:      #e6e6ec;
        --line-2:    #d8d8e0;
        /* Brand */    --accent:       #b3261e;
        --accent-dark:  #8a1d18;
        --accent-soft:  #fdecea;
        --header:       #0f0f12;
        --header-ink:   #f6f6f8;
        --header-muted: #a8a8b2;
        /* Misc */    --link:    #1a4fa6;
        --warn:    #b96b00;
        --good:    #1e7a44;
        /* Elevation */    --shadow-sm: 0 1px 2px rgba(15,15,18,.04), 0 1px 1px rgba(15,15,18,.03);
        --shadow:    0 1px 2px rgba(15,15,18,.05), 0 6px 18px rgba(15,15,18,.06);
        --shadow-lg: 0 2px 6px rgba(15,15,18,.06), 0 18px 40px rgba(15,15,18,.10);
        --ring:      0 0 0 3px rgba(179, 38, 30, .25);
        /* Geometry */    --radius-sm: 6px;
        --radius:    10px;
        --radius-lg: 14px;
        --gutter:    20px;
        --container: 1200px;
        /* Type */    --font-sans:  "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
        --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
        --font-mono:  ui-monospace, "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark)  {
        /* Light scheme is the brand default;
     opt out of UA dark form styling. */    :root  {
     color-scheme: light;
     }
}
*  {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
     }
*::selection  {
     background: var(--accent);
     color: #fff;
     }
html  {
     -webkit-text-size-adjust: 100%;
     }
html, body  {
     height: 100%;
     }
body  {
        font-family: var(--font-sans);
        background: var(--bg);
        color: var(--ink);
        line-height: 1.55;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
}
a  {
     color: var(--link);
     text-decoration: none;
     transition: color .15s ease;
     }
a:hover  {
     text-decoration: underline;
     }
img, svg, video  {
     max-width: 100%;
     display: block;
     }
code, kbd, pre, samp  {
     font-family: var(--font-mono);
     font-size: .9em;
     }
:not(pre) > code  {
        background: var(--surface-2);
        border: 1px solid var(--line);
        border-radius: 4px;
        padding: 1px 6px;
        font-size: .88em;
        color: var(--ink-2);
        word-break: break-word;
}
hr  {
     border: 0;
     border-top: 1px solid var(--line);
     margin: 24px 0;
     }
/* ---------- BANNER ---------- */.site-banner  {
        background: #7a3800;
        color: #ffe9cc;
        text-align: center;
        font-family: var(--font-sans);
        font-size: .82rem;
        font-weight: 600;
        letter-spacing: .01em;
        padding: 7px var(--gutter);
}
/* ---------- HEADER ---------- */.site-header  {
        position: sticky;
        top: 0;
        z-index: 50;
        background: rgba(15, 15, 18, .92);
        color: var(--header-ink);
        border-bottom: 3px solid var(--accent);
        backdrop-filter: saturate(140%) blur(8px);
        -webkit-backdrop-filter: saturate(140%) blur(8px);
}
.site-header-inner  {
        max-width: var(--container);
        margin: 0 auto;
        padding: 12px var(--gutter);
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 16px;
}
.logo  {
        display: flex;
        align-items: center;
        gap: 12px;
        color: var(--header-ink);
        text-decoration: none;
}
.logo:hover  {
     text-decoration: none;
     opacity: .9;
     }
.logo img  {
     height: 42px;
     width: auto;
     }
.logo-text  {
     display: flex;
     flex-direction: column;
     line-height: 1.1;
     }
.logo-title  {
        font-family: var(--font-serif);
        font-size: 1.5rem;
        font-weight: 700;
        letter-spacing: .2px;
}
.logo-tagline  {
        color: var(--header-muted);
        font-size: .78rem;
        font-style: italic;
}
.main-nav  {
     margin-left: auto;
     flex: 1 1 100%;
     }
@media (min-width: 900px)  {
     .main-nav  {
     flex: 1 1 auto;
     }
 }
.main-nav ul  {
        list-style: none;
        display: flex;
        flex-wrap: wrap;
        gap: 4px 14px;
        justify-content: flex-end;
}
.main-nav a  {
        color: var(--header-ink);
        font-family: var(--font-sans);
        font-size: .82rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .6px;
        padding: 6px 2px;
        border-bottom: 2px solid transparent;
        transition: border-color .15s ease, color .15s ease;
}
.main-nav a:hover  {
     border-bottom-color: var(--accent);
     text-decoration: none;
     }
.nav-sep  {
     opacity: .35;
     pointer-events: none;
     }
/* ---------- NAV DROPDOWNS (Topics + custom menus) ---------- */
.nav-dd-toggle  {
     position: absolute;
     opacity: 0;
     pointer-events: none;
     }
.nav-dropdown  {
     position: relative;
     list-style: none;
     }
.nav-dd-btn  {
        color: var(--header-ink);
        font-family: var(--font-sans);
        font-size: .82rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .6px;
        padding: 6px 2px;
        border-bottom: 2px solid transparent;
        transition: border-color .15s ease;
        cursor: pointer;
        user-select: none;
        display: inline-flex;
        align-items: center;
        gap: 4px;
}
.nav-dd-btn:hover,
.nav-dd-toggle:checked ~ .nav-dd-btn  {
     border-bottom-color: var(--accent);
     }
.nav-dd-arrow  {
     font-size: .65rem;
     opacity: .75;
     transition: transform .2s ease;
     display: inline-block;
     }
.nav-dd-toggle:checked ~ .nav-dd-btn .nav-dd-arrow  {
     transform: rotate(180deg);
     }
.nav-dd-menu  {
        display: none !important;
        position: absolute;
        top: calc(100% + 6px);
        left: 50%;
        transform: translateX(-50%);
        background: #1c1c22;
        border: 1px solid rgba(255,255,255,.12);
        border-radius: var(--radius-sm);
        min-width: 150px;
        padding: 4px 0;
        list-style: none;
        z-index: 200;
        box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.nav-dd-toggle:checked ~ .nav-dd-menu  {
     display: block !important;
     }
.nav-dd-menu li  {
     list-style: none;
     }
.nav-dd-menu a  {
        display: block;
        padding: 9px 18px;
        font-size: .79rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .6px;
        color: var(--header-ink);
        white-space: nowrap;
        border-bottom: none;
        transition: background .12s ease;
}
.nav-dd-menu a:hover  {
     background: rgba(255,255,255,.08);
     text-decoration: none;
     border-bottom: none;
     }
.nav-toggle  {
     position: absolute;
     opacity: 0;
     pointer-events: none;
     }
.hamburger  {
        display: none;
        margin-left: auto;
        cursor: pointer;
        font-size: 22px;
        padding: 6px 12px;
        border: 1px solid rgba(255,255,255,.18);
        border-radius: var(--radius-sm);
        color: var(--header-ink);
        user-select: none;
}
.hamburger:hover  {
     background: rgba(255,255,255,.06);
     }
@media (max-width: 880px)  {
        .hamburger  {
     display: inline-flex;
     align-items: center;
     }
    .main-nav  {
     display: none;
     flex-basis: 100%;
     }
    .nav-toggle:checked ~ .main-nav  {
     display: block;
     }
    .main-nav ul  {
     flex-direction: column;
     align-items: stretch;
     gap: 0;
     }
    .main-nav a  {
            display: block;
            padding: 12px 4px;
            border-bottom: 1px solid rgba(255,255,255,.06);
            text-align: left;
        }
    .nav-sep  {
     display: none;
     }
}
/* Dropdown overrides for mobile nav */
@media (max-width: 880px)  {
    .nav-dd-btn  {
            display: block;
            width: 100%;
            padding: 12px 4px;
            border-bottom: 1px solid rgba(255,255,255,.06);
            text-align: left;
    }
    .nav-dd-menu  {
            position: static;
            transform: none;
            box-shadow: none;
            background: transparent;
            border: none;
            border-radius: 0;
            min-width: 0;
            padding: 0;
    }
    .nav-dd-menu a  {
            padding: 10px 4px 10px 20px;
            border-bottom: 1px solid rgba(255,255,255,.06);
    }
}.content-wrapper  {
        max-width: var(--container);
        margin: 28px auto 40px;
        padding: 0 var(--gutter);
}
.page-title  {
        font-family: var(--font-serif);
        font-size: clamp(1.75rem, 4vw, 2.4rem);
        line-height: 1.15;
        margin-bottom: 4px;
        border-bottom: 2px solid var(--accent);
        padding-bottom: 12px;
}
.page-subtitle  {
     color: var(--muted);
     margin-bottom: 22px;
     font-size: .95rem;
     }
.section-title  {
        font-size: .85rem;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        color: var(--ink-2);
        border-bottom: 2px solid var(--ink);
        padding-bottom: 8px;
        margin: 28px 0 16px;
}
.muted  {
     color: var(--muted);
     }
/* Tag / badge pill */.badge  {
        display: inline-block;
        background: var(--accent);
        color: #fff;
        text-transform: uppercase;
        font-size: .7rem;
        font-weight: 700;
        letter-spacing: 1px;
        padding: 4px 10px;
        border-radius: 999px;
        font-family: var(--font-sans);
        margin-bottom: 10px;
        line-height: 1.2;
}
.badge.small  {
     font-size: .62rem;
     padding: 3px 8px;
     letter-spacing: .8px;
     }
/* ---------- FEATURED ---------- */.featured-article  {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--radius-lg);
        overflow: hidden;
        box-shadow: var(--shadow);
        margin-bottom: 22px;
        transition: transform .2s ease, box-shadow .2s ease;
}
.featured-article:hover  {
     box-shadow: var(--shadow-lg);
     }
.featured-link  {
     display: flex;
     color: inherit;
     align-items: stretch;
     }
.featured-link:hover  {
     text-decoration: none;
     }
.featured-link:hover h2  {
     color: var(--accent);
     }
.featured-article img  {
        width: 55%;
        height: 100%;
        min-height: 360px;
        max-height: 460px;
        object-fit: cover;
        transition: transform .35s ease;
}
.featured-article:hover img  {
     transform: scale(1.02);
     }
.featured-text  {
        padding: 32px 36px;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 6px;
}
.featured-text > *  {
     max-width: 100%;
     }
.featured-text h2  {
        font-family: var(--font-serif);
        font-size: clamp(1.4rem, 3vw, 2.1rem);
        line-height: 1.18;
        margin-bottom: 8px;
        transition: color .15s ease;
}
.featured-text p  {
     color: var(--muted);
     font-size: 1.02rem;
     }
.featured-article.empty  {
     background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
     }
@media (max-width: 820px)  {
        .featured-link  {
     flex-direction: column;
     }
    .featured-article img  {
     width: 100%;
     min-height: 0;
     height: 220px;
     max-height: 280px;
     }
    .featured-text  {
     padding: 20px;
     }
}
/* ---------- SECONDARY STRIP ---------- */.secondary-strip  {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
        margin-bottom: 32px;
}
.strip-card  {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        overflow: hidden;
        box-shadow: var(--shadow-sm);
        color: inherit;
        display: flex;
        flex-direction: column;
        transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.strip-card:hover  {
        text-decoration: none;
        transform: translateY(-2px);
        box-shadow: var(--shadow);
        border-color: var(--line-2);
}
.strip-card:hover h4  {
     color: var(--accent);
     }
.strip-card img  {
     width: 100%;
     height: 130px;
     object-fit: cover;
     }
.strip-card > div  {
     padding: 14px 14px 16px;
     }
.strip-card h4  {
        font-family: var(--font-serif);
        font-size: 1.02rem;
        line-height: 1.25;
        margin: 6px 0 6px;
        transition: color .15s ease;
}
@media (max-width: 820px)  {
     .secondary-strip  {
     grid-template-columns: repeat(2, 1fr);
     }
 }
@media (max-width: 480px)  {
     .secondary-strip  {
     grid-template-columns: 1fr;
     }
 }
/* ---------- MAIN LAYOUT ---------- */.main-layout  {
        display: grid;
        grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
        gap: 32px;
}
@media (max-width: 900px)  {
     .main-layout  {
     grid-template-columns: 1fr;
     gap: 24px;
     }
 }
/* ---------- ARTICLE CARDS (grid) ---------- */.grid-cards  {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
}
.grid-cards .card  {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        overflow: hidden;
        box-shadow: var(--shadow-sm);
        transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
        display: flex;
        flex-direction: column;
        padding: 0;
}
.grid-cards .card:hover  {
        transform: translateY(-2px);
        box-shadow: var(--shadow);
        border-color: var(--line-2);
}
.grid-cards .card a  {
     color: inherit;
     display: block;
     }
.grid-cards .card a:hover  {
     text-decoration: none;
     }
.grid-cards .card a:hover h3  {
     color: var(--accent);
     }
.grid-cards .card img  {
     width: 100%;
     height: 170px;
     object-fit: cover;
     }
.card-body  {
     padding: 16px 18px 18px;
     }
.grid-cards .card h3  {
        font-family: var(--font-serif);
        font-size: 1.18rem;
        line-height: 1.25;
        margin: 8px 0 8px;
        transition: color .15s ease;
}
.article-snippet  {
     color: var(--muted);
     font-size: .96rem;
     margin-bottom: 10px;
     }
.article-meta  {
        color: var(--muted);
        font-size: .82rem;
        font-family: var(--font-sans);
}
.see-more  {
     text-align: center;
     margin: 24px 0 8px;
     }
.see-more a  {
     font-weight: 700;
     color: var(--accent);
     }
/* ---------- SIDEBAR ---------- */.sidebar  {
        background: var(--surface);
        padding: 22px 24px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow-sm);
        align-self: start;
        position: sticky;
        top: 90px;
}
@media (max-width: 900px)  {
     .sidebar  {
     position: static;
     }
 }
.sidebar h3  {
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 2px solid var(--ink);
        font-size: .82rem;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        color: var(--ink-2);
}
.sidebar h3:not(:first-child)  {
     margin-top: 26px;
     }
.trending-list  {
     list-style: none;
     counter-reset: trend;
     }
.trending-list li  {
        counter-increment: trend;
        padding: 10px 0;
        border-bottom: 1px solid var(--line);
        display: flex;
        gap: 12px;
        align-items: baseline;
}
.trending-list li:last-child  {
     border-bottom: none;
     }
.trending-list li::before  {
        content: counter(trend);
        font-family: var(--font-sans);
        font-weight: 700;
        color: var(--accent);
        font-size: 1.25rem;
        min-width: 22px;
        line-height: 1;
}
.trending-list a  {
     color: var(--ink);
     font-weight: 600;
     }
.trending-list a:hover  {
     color: var(--accent);
     text-decoration: none;
     }
.trending-list .meta  {
        color: var(--muted);
        font-size: .78rem;
        margin-left: auto;
        font-family: var(--font-sans);
        white-space: nowrap;
}
.cat-list  {
     list-style: none;
     }
.cat-list li  {
     padding: 8px 0;
     border-bottom: 1px solid var(--line);
     }
.cat-list li:last-child  {
     border-bottom: none;
     }
.cat-list a  {
     color: var(--ink);
     font-family: var(--font-sans);
     font-size: .94rem;
     }
.cat-list a:hover  {
     color: var(--accent);
     text-decoration: none;
     }
/* ---------- ARTICLE PAGE ---------- */.full-article  {
        background: var(--surface);
        padding: 40px 44px;
        border: 1px solid var(--line);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow);
        max-width: 820px;
        margin: 0 auto 28px;
}
.breadcrumbs  {
        color: var(--muted);
        font-size: .82rem;
        font-family: var(--font-sans);
        margin-bottom: 14px;
}
.breadcrumbs a  {
     color: var(--muted);
     }
.breadcrumbs a:hover  {
     color: var(--accent);
     }
.article-title  {
        font-family: var(--font-serif);
        font-size: clamp(1.6rem, 4vw, 2.4rem);
        line-height: 1.18;
        margin-bottom: 12px;
        letter-spacing: -0.01em;
}
.full-article .article-meta  {
     margin-bottom: 22px;
     font-size: .88rem;
     }
.article-hero  {
        width: 100%;
        max-height: 480px;
        object-fit: cover;
        border-radius: var(--radius);
        margin: 14px 0 24px;
}
.article-body  {
        font-family: var(--font-serif);
        font-size: 1.12rem;
        line-height: 1.75;
        color: var(--ink-2);
}
.article-body p  {
     margin-bottom: 18px;
     }
.article-body h2  {
     font-family: var(--font-serif);
     margin: 28px 0 12px;
     font-size: 1.55rem;
     }
.article-body h3  {
     font-family: var(--font-serif);
     margin: 22px 0 10px;
     font-size: 1.25rem;
     }
.article-body img  {
     margin: 20px 0;
     border-radius: var(--radius);
     }
.article-body blockquote  {
        border-left: 3px solid var(--accent);
        margin: 20px 0;
        padding: 6px 18px;
        color: var(--muted);
        font-style: italic;
}
.article-body a  {
     color: var(--link);
     border-bottom: 1px solid rgba(26,79,166,.25);
     }
.article-body a:hover  {
     border-bottom-color: var(--link);
     text-decoration: none;
     }
.article-actions  {
        margin-top: 28px;
        padding-top: 18px;
        border-top: 1px solid var(--line);
}
.related-strip  {
     max-width: 1200px;
     margin: 36px auto;
     }
@media (max-width: 600px)  {
        .full-article  {
     padding: 24px 20px;
     }
}
/* ---------- BUTTONS / FORMS ---------- */.btn  {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        background: var(--surface);
        color: var(--ink);
        border: 1px solid var(--line-2);
        padding: 9px 16px;
        border-radius: var(--radius-sm);
        font-family: var(--font-sans);
        font-weight: 600;
        cursor: pointer;
        text-decoration: none;
        font-size: .9rem;
        line-height: 1.2;
        transition: background .15s ease, border-color .15s ease, color .15s ease, transform .05s ease, box-shadow .15s ease;
        user-select: none;
        white-space: nowrap;
}
.btn:hover  {
        border-color: var(--ink-2);
        background: var(--surface-2);
        text-decoration: none;
}
.btn:focus-visible  {
     outline: none;
     box-shadow: var(--ring);
     }
.btn:active  {
     transform: translateY(1px);
     }
.btn:disabled, .btn[aria-disabled="true"]  {
     opacity: .55;
     cursor: not-allowed;
     }
.btn.primary  {
        background: var(--accent);
        color: #fff;
        border-color: var(--accent);
        box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, var(--shadow-sm);
}
.btn.primary:hover  {
     background: var(--accent-dark);
     border-color: var(--accent-dark);
     }
.btn.danger  {
        background: var(--surface);
        color: var(--accent);
        border-color: var(--accent);
}
.btn.danger:hover  {
     background: var(--accent-soft);
     }
.btn.small  {
     padding: 5px 10px;
     font-size: .8rem;
     border-radius: 5px;
     }
.btn .badge  {
     margin: 0 0 0 4px;
     padding: 2px 8px;
     font-size: .62rem;
     }
.link-button  {
        background: none;
        border: none;
        color: var(--link);
        cursor: pointer;
        font-family: inherit;
        font-size: inherit;
        padding: 0;
        text-decoration: underline;
}
.link-button:hover  {
     color: var(--accent);
     }
.link-button.danger  {
     color: var(--accent);
     }
.form-stack  {
        max-width: 720px;
        display: flex;
        flex-direction: column;
        gap: 16px;
}
.form-stack label  {
        display: flex;
        flex-direction: column;
        gap: 6px;
        font-family: var(--font-sans);
        font-size: .88rem;
        font-weight: 600;
        color: var(--ink-2);
}
.form-stack input[type=text],.form-stack input[type=password],.form-stack input[type=email],.form-stack input[type=search],.form-stack input[type=number],.form-stack input[type=url],.form-stack textarea,.form-stack select,.form-stack input[type=file]  {
        font-family: var(--font-sans);
        font-size: 1rem;
        font-weight: 400;
        padding: 10px 12px;
        border: 1px solid var(--line-2);
        border-radius: var(--radius-sm);
        background: var(--surface);
        color: var(--ink);
        width: 100%;
        transition: border-color .15s ease, box-shadow .15s ease;
}
.form-stack textarea  {
     font-family: var(--font-mono);
     line-height: 1.55;
     resize: vertical;
     }
.form-stack input:focus,.form-stack textarea:focus,.form-stack select:focus  {
     outline: none;
     border-color: var(--accent);
     box-shadow: var(--ring);
     }
.form-stack input:disabled, .form-stack select:disabled, .form-stack textarea:disabled  {
        background: var(--surface-2);
        color: var(--muted);
        cursor: not-allowed;
}
.form-stack input[type=file]  {
     padding: 8px 10px;
     cursor: pointer;
     }
.form-stack h2  {
     font-size: 1.1rem;
     margin-top: 8px;
     padding-bottom: 6px;
     border-bottom: 1px solid var(--line);
     }
.form-actions  {
     display: flex;
     gap: 10px;
     flex-wrap: wrap;
     align-items: center;
     }
.hint  {
     color: var(--muted);
     font-size: .82rem;
     font-family: var(--font-sans);
     }
/* Auth card */.auth-card  {
        max-width: 420px;
        margin: 56px auto;
        background: var(--surface);
        padding: 32px 36px;
        border: 1px solid var(--line);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow);
}
.auth-card h1  {
     margin-bottom: 18px;
     font-family: var(--font-serif);
     }
.auth-card form  {
     display: flex;
     flex-direction: column;
     gap: 14px;
     }
.auth-card label  {
     display: flex;
     flex-direction: column;
     gap: 6px;
     font-family: var(--font-sans);
     font-size: .88rem;
     font-weight: 600;
     }
.auth-card input  {
     padding: 10px 12px;
     border: 1px solid var(--line-2);
     border-radius: var(--radius-sm);
     font-size: 1rem;
     font-family: var(--font-sans);
     }
.auth-card input:focus  {
     outline: none;
     border-color: var(--accent);
     box-shadow: var(--ring);
     }
.auth-card .hint  {
     color: var(--muted);
     font-size: .85rem;
     margin-top: 14px;
     }
/* Flash messages */.flash  {
        padding: 12px 16px;
        border-radius: var(--radius-sm);
        margin-bottom: 18px;
        font-family: var(--font-sans);
        font-size: .92rem;
        border: 1px solid transparent;
        display: flex;
        gap: 10px;
        align-items: flex-start;
}
.flash ul  {
     padding-left: 20px;
     }
.flash-success  {
     background: #ecf7f0;
     color: #1e6b39;
     border-color: #c4e3cf;
     }
.flash-error    {
     background: #fdecea;
     color: #8a1d18;
     border-color: #f3b6b1;
     }
.flash-info     {
     background: #eef3ff;
     color: #1a3a8a;
     border-color: #c2d1f4;
     }
/* Pagination */.pagination  {
     display: flex;
     gap: 6px;
     flex-wrap: wrap;
     justify-content: center;
     margin: 28px 0 8px;
     }
.pagination a  {
        padding: 8px 14px;
        border: 1px solid var(--line-2);
        border-radius: var(--radius-sm);
        background: var(--surface);
        color: var(--ink);
        font-family: var(--font-sans);
        font-size: .9rem;
        font-weight: 600;
}
.pagination a.current  {
     background: var(--accent);
     color: white;
     border-color: var(--accent);
     }
.pagination a:hover  {
     text-decoration: none;
     border-color: var(--ink-2);
     background: var(--surface-2);
     }
.pagination a.current:hover  {
     background: var(--accent-dark);
     }
/* ---------- ADMIN ---------- */.admin-body  {
     background: #eef0f4;
     }
.admin-header  {
        background: linear-gradient(180deg, #1c1c22 0%, #16161b 100%);
        color: #fff;
        border-bottom: 1px solid #000;
        box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 2px 6px rgba(0,0,0,.15);
        position: sticky;
        top: 0;
        z-index: 50;
}
.admin-header-inner  {
        max-width: var(--container);
        margin: 0 auto;
        padding: 12px var(--gutter);
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 14px;
        font-family: var(--font-sans);
}
.admin-brand  {
     color: white;
     font-size: 1rem;
     letter-spacing: .2px;
     }
.admin-brand strong  {
     color: var(--accent);
     }
.admin-brand:hover  {
     text-decoration: none;
     opacity: .9;
     }
.admin-nav-toggle  {
     position: absolute;
     opacity: 0;
     pointer-events: none;
     }
.admin-hamburger  {
        display: none;
        margin-left: auto;
        cursor: pointer;
        font-size: 18px;
        padding: 6px 12px;
        border: 1px solid rgba(255,255,255,.18);
        border-radius: var(--radius-sm);
        color: #fff;
        user-select: none;
}
.admin-hamburger:hover  {
     background: rgba(255,255,255,.06);
     }
.admin-nav  {
     display: flex;
     gap: 6px 16px;
     flex-wrap: wrap;
     }
.admin-nav a  {
        color: #d2d2dc;
        font-weight: 600;
        font-size: .88rem;
        padding: 4px 2px;
        border-bottom: 2px solid transparent;
        transition: color .15s ease, border-color .15s ease;
}
.admin-nav a:hover  {
     color: #fff;
     border-bottom-color: var(--accent);
     text-decoration: none;
     }
.admin-user  {
     margin-left: auto;
     color: #b8b8c4;
     font-size: .82rem;
     }
.admin-user strong  {
     color: #fff;
     }
@media (max-width: 980px)  {
        .admin-hamburger  {
     display: inline-flex;
     align-items: center;
     }
    .admin-nav, .admin-user  {
     display: none;
     flex-basis: 100%;
     }
    .admin-nav-toggle:checked ~ .admin-nav,    .admin-nav-toggle:checked ~ .admin-user  {
     display: flex;
     }
    .admin-nav  {
     flex-direction: column;
     gap: 0;
     margin-top: 6px;
     }
    .admin-nav a  {
            padding: 11px 4px;
            border-bottom: 1px solid rgba(255,255,255,.06);
        }
    .admin-user  {
     margin: 6px 0 0;
     padding: 8px 4px 0;
     border-top: 1px solid rgba(255,255,255,.08);
     }
}
.admin-main  {
        max-width: var(--container);
        margin: 28px auto 40px;
        padding: 0 var(--gutter);
}
.admin-main h1  {
        margin-bottom: 8px;
        font-family: var(--font-serif);
        font-size: clamp(1.6rem, 3vw, 2rem);
}
.admin-main h1 + .page-subtitle, .admin-main > h1 + p  {
     margin-bottom: 24px;
     }
.admin-main h2  {
        font-family: var(--font-serif);
        font-size: 1.25rem;
        margin-bottom: 14px;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--line);
}
.page-head  {
     margin-bottom: 24px;
     }
.page-head h1  {
     margin-bottom: 6px;
     }
.page-head p  {
     color: var(--muted);
     font-size: .94rem;
     max-width: 720px;
     }
.stat-row  {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
        margin: 18px 0 28px;
}
@media (max-width: 720px)  {
     .stat-row  {
     grid-template-columns: repeat(2, 1fr);
     }
 }
.stat  {
        background: var(--surface);
        padding: 20px 18px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow-sm);
        text-align: center;
}
.stat .num  {
        display: block;
        font-size: 2.1rem;
        font-weight: 700;
        color: var(--accent);
        font-family: var(--font-sans);
        line-height: 1;
        margin-bottom: 4px;
}
.stat .label  {
        color: var(--muted);
        font-size: .78rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        font-family: var(--font-sans);
}
.admin-grid  {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 18px;
}
/* Generic surface panel — used by admin sections (panel and card share style). */.panel,.admin-main .card  {
        background: var(--surface);
        padding: 22px 24px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow-sm);
        margin-bottom: 22px;
}
.panel h2,.admin-main .card h2  {
     margin-bottom: 14px;
     }
.panel p  {
     margin-bottom: 8px;
     }
.plain-list  {
     list-style: none;
     }
.plain-list li  {
        padding: 10px 0;
        border-bottom: 1px solid var(--line);
        display: flex;
        justify-content: space-between;
        gap: 10px;
        font-family: var(--font-sans);
        font-size: .92rem;
}
.plain-list li:last-child  {
     border-bottom: none;
     }
.plain-list .meta  {
     color: var(--muted);
     font-size: .8rem;
     }
.filter-row  {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        margin: 18px 0;
        align-items: center;
}
.filter-row input, .filter-row select  {
        padding: 8px 12px;
        border: 1px solid var(--line-2);
        border-radius: var(--radius-sm);
        font-family: var(--font-sans);
        font-size: .9rem;
        background: var(--surface);
}
.filter-row input:focus, .filter-row select:focus  {
     outline: none;
     border-color: var(--accent);
     box-shadow: var(--ring);
     }
/* ---------- TABLES ---------- *//* Make wide tables scroll horizontally on narrow screens without breaking   layout. Display:block + overflow-x:auto on the table itself does the trick. */.data-table  {
        width: 100%;
        background: var(--surface);
        border-collapse: separate;
        border-spacing: 0;
        box-shadow: var(--shadow-sm);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        overflow: hidden;
        font-family: var(--font-sans);
        font-size: .92rem;
}
.data-table th, .data-table td  {
        padding: 12px 14px;
        text-align: left;
        border-bottom: 1px solid var(--line);
        vertical-align: middle;
}
.data-table th  {
        background: var(--surface-2);
        text-transform: uppercase;
        font-size: .72rem;
        letter-spacing: 1px;
        color: var(--muted);
        font-weight: 700;
}
.data-table tbody tr  {
     transition: background .12s ease;
     }
.data-table tbody tr:hover  {
     background: var(--surface-2);
     }
.data-table tr:last-child td  {
     border-bottom: none;
     }
.data-table code  {
        word-break: break-all;
        overflow-wrap: anywhere;
        white-space: normal;
        font-size: .82rem;
}
.data-table .actions, .data-table .row-actions  {
        display: flex;
        gap: 8px;
        align-items: center;
        flex-wrap: wrap;
        justify-content: flex-end;
}
.data-table .row-actions .inline-form  {
     display: inline;
     margin: 0;
     }
.data-table .actions form  {
     display: inline-flex;
     gap: 4px;
     align-items: center;
     }
.data-table .actions input[type=password]  {
     padding: 4px 8px;
     font-size: .82rem;
     width: 120px;
     border: 1px solid var(--line-2);
     border-radius: 4px;
     }
.data-table td:nth-last-child(2)  {
     white-space: nowrap;
     }
 /* keep size column on one line */.empty-cell  {
     text-align: center;
     color: var(--muted);
     padding: 28px;
     }
/* Wrap the table in a horizontal scroll container on narrow screens. */.table-wrap  {
     overflow-x: auto;
     -webkit-overflow-scrolling: touch;
     border-radius: var(--radius);
     }
@media (max-width: 720px)  {
        .data-table  {
     display: block;
     overflow-x: auto;
     white-space: nowrap;
     border-radius: var(--radius);
     }
    .data-table thead, .data-table tbody, .data-table tr  {
     display: table;
     width: 100%;
     table-layout: auto;
     }
    .data-table code  {
     white-space: normal;
     }
    .data-table .actions, .data-table .row-actions  {
     justify-content: flex-start;
     }
}
/* ---------- IMPORT DROPS ---------- */.upload-form .dropzone  {
        display: block;
        border: 2px dashed var(--line-2);
        border-radius: var(--radius);
        padding: 28px;
        text-align: center;
        background: var(--surface-2);
        cursor: pointer;
        transition: border-color .15s, background .15s;
        margin-bottom: 14px;
}
.upload-form .dropzone:hover  {
     border-color: var(--accent);
     background: var(--accent-soft);
     }
.upload-form .dropzone input[type=file]  {
     display: block;
     margin: 0 auto 12px;
     max-width: 100%;
     }
.upload-form .dropzone-text strong  {
     display: block;
     font-size: 1rem;
     margin-bottom: 4px;
     font-family: var(--font-sans);
     }
.upload-form .dropzone-text small  {
     color: var(--muted);
     }
.import-meta  {
        background: var(--surface-2);
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
        padding: 12px 16px;
        font-size: .9rem;
        margin-bottom: 14px;
        display: flex;
        flex-direction: column;
        gap: 6px;
        font-family: var(--font-sans);
}
.model-identified {
        color: var(--accent, #4a9eff);
        font-family: var(--font-mono);
        font-size: .85em;
}
.model-unidentified {
        color: var(--muted, #888);
        font-style: italic;
}
.mono-area  {
        font-family: var(--font-mono) !important;
        font-size: .88rem;
        line-height: 1.5;
}
.import-preview  {
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
        background: var(--surface);
        margin-top: 4px;
        overflow: hidden;
}
.import-preview-label  {
        background: var(--surface-2);
        padding: 8px 14px;
        font-size: .72rem;
        letter-spacing: 1.2px;
        text-transform: uppercase;
        color: var(--muted);
        border-bottom: 1px solid var(--line);
        font-family: var(--font-sans);
        font-weight: 700;
}
.import-preview-body  {
     padding: 16px 20px;
     font-family: var(--font-serif);
     }
.import-preview-body h1, .import-preview-body h2, .import-preview-body h3  {
     margin: .6em 0 .3em;
     }
.import-preview-body p  {
     margin: 0 0 .8em;
     }
.image-preview  {
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
        background: var(--surface);
        overflow: hidden;
        max-width: 360px;
}
.image-preview img  {
     display: block;
     width: 100%;
     height: auto;
     }
.token-box  {
        background: #14141a;
        color: #f6f6f8;
        padding: 14px 16px;
        border-radius: var(--radius-sm);
        font-family: var(--font-mono);
        font-size: .85rem;
        line-height: 1.55;
        white-space: pre-wrap;
        word-break: break-all;
        overflow-x: auto;
        margin: 10px 0;
        border: 1px solid #000;
}
/* ---------- WYSIWYG (Quill) ---------- */.editor-label  {
     display: flex;
     flex-direction: column;
     gap: 6px;
     font-family: var(--font-sans);
     font-size: .88rem;
     }
.editor-label .editor-label-row  {
     display: flex;
     justify-content: space-between;
     align-items: baseline;
     gap: 12px;
     flex-wrap: wrap;
     }
.editor-label .editor-label-text  {
     font-weight: 600;
     color: var(--ink-2);
     }
.editor-shell  {
        border: 1px solid var(--line-2);
        border-radius: var(--radius-sm);
        background: var(--surface);
        overflow: hidden;
}
#editor-toolbar.ql-toolbar.ql-snow  {
        border: none;
        border-bottom: 1px solid var(--line);
        background: var(--surface-2);
        padding: 6px 8px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px 0;
}
#editor-toolbar.ql-snow .ql-formats  {
     margin-right: 10px;
     }
#editor-toolbar .ql-picker .ql-picker-options  {
     z-index: 20;
     }
.ql-container.ql-snow  {
     border: none;
     font-family: var(--font-serif);
     font-size: 1.05rem;
     }
.ql-editor  {
        min-height: 360px;
        padding: 18px 20px;
        line-height: 1.7;
}
.ql-editor.ql-blank::before  {
     font-style: normal;
     color: var(--muted);
     }
.ql-editor h2  {
     font-size: 1.45rem;
     margin: 16px 0 8px;
     }
.ql-editor h3  {
     font-size: 1.18rem;
     margin: 14px 0 6px;
     }
.ql-editor img  {
     max-width: 100%;
     height: auto;
     border-radius: var(--radius-sm);
     }
.ql-editor blockquote  {
     border-left: 3px solid var(--accent);
     margin: 14px 0;
     padding: 4px 16px;
     color: var(--muted);
     }
#body-source[hidden]  {
     display: none;
     }
#body-source:not([hidden])  {
        font-family: var(--font-mono);
        font-size: .92rem;
        min-height: 360px;
}
@media (max-width: 600px)  {
        .ql-editor  {
     min-height: 280px;
     padding: 14px 16px;
     font-size: 1rem;
     }
    #editor-toolbar.ql-toolbar.ql-snow  {
     padding: 4px 6px;
     }
}
/* ---------- FOOTER ---------- */.site-footer  {
        background: var(--header);
        color: #c2c2cc;
        margin-top: 48px;
        padding: 24px 20px;
        text-align: center;
        font-family: var(--font-sans);
        font-size: .86rem;
        border-top: 3px solid var(--accent);
}
.site-footer-inner  {
     max-width: var(--container);
     margin: 0 auto;
     }
.footer-links  {
     margin-top: 8px;
     }
.footer-links a  {
     color: #c2c2cc;
     }
.footer-links a:hover  {
     color: #fff;
     }
.footer-disclaimer  {
     margin-bottom: 12px;
     padding: 10px 16px;
     border: 1px solid rgba(255,255,255,.12);
     border-radius: var(--radius-sm);
     font-size: .78rem;
     color: #9a9aaa;
     font-style: italic;
     line-height: 1.55;
     max-width: 680px;
     margin-left: auto;
     margin-right: auto;
     }
/* ---------- UTILITIES ---------- */@media (prefers-reduced-motion: reduce)  {
        *, *::before, *::after  {
            animation-duration: .001ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: .001ms !important;
            scroll-behavior: auto !important;
        }
}
/* =========================================================
/* =========================================================
   COMMENTS SECTION
   ========================================================= */
.comments-section {
    margin: 48px 0 24px;
    border-top: 1px solid var(--line);
    padding-top: 28px;
}
.comments-section .section-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin: 0 0 18px;
}
.comments-count {
    font-family: var(--font-sans);
    font-size: .9rem;
    color: var(--muted);
    font-weight: 400;
    margin-left: 6px;
}
.comments-empty,
.comments-signin {
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin: 14px 0;
}
.comments-signin a { font-weight: 600; }

.comment-form {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    margin: 0 0 22px;
    box-shadow: var(--shadow-sm);
}
.comment-form textarea {
    width: 100%;
    min-height: 90px;
    padding: 10px 12px;
    font-family: var(--font-sans);
    font-size: .95rem;
    line-height: 1.5;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    resize: vertical;
    box-sizing: border-box;
}
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--ring);
}
.comment-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.comment-form-hint { color: var(--muted); font-size: .85rem; }
.comment-reply-form { margin: 12px 0 4px; background: var(--surface-2); }

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.comment-list-top > .comment {
    border-top: 1px solid var(--line);
    padding-top: 18px;
    margin-top: 18px;
}
.comment-list-top > .comment:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.comment {
    list-style: none;
    margin: 0;
}
.comment-card {
    padding: 4px 0 0;
}
.comment-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    font-size: .85rem;
    margin-bottom: 6px;
}
.comment-author {
    font-weight: 700;
    color: var(--ink);
}
.comment-when { color: var(--muted); }
.comment-edited,
.comment-hidden-tag {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    border: 1px solid var(--line-2);
    border-radius: 999px;
    padding: 1px 8px;
}
.comment-hidden-tag {
    color: var(--accent-dark);
    border-color: var(--accent);
    background: var(--accent-soft);
}
.comment-body {
    color: var(--ink-2);
    line-height: 1.6;
    font-size: .98rem;
    margin: 4px 0 8px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.comment-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}
.comment-action {
    font-size: .8rem;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px dotted transparent;
}
.comment-action:hover {
    color: var(--ink);
    border-bottom-color: var(--ink);
    text-decoration: none;
}
.comment-action.danger:hover { color: var(--accent); border-bottom-color: var(--accent); }
.inline-form { display: inline; margin: 0; padding: 0; }
.linklike {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

/* Reply trees */
.comment-replies {
    margin: 10px 0 0 0;
    padding: 0 0 0 18px;
    border-left: 2px solid var(--line);
}
.comment-replies-toggle {
    cursor: pointer;
    font-size: .82rem;
    font-weight: 600;
    color: var(--link);
    padding: 4px 0;
    list-style: none;
    user-select: none;
    display: inline-block;
}
.comment-replies-toggle::-webkit-details-marker { display: none; }
.comment-replies-toggle::before {
    content: "? ";
    display: inline-block;
    transition: transform .15s ease;
    color: var(--muted);
}
.comment-replies[open] > .comment-replies-toggle::before {
    content: "? ";
}
.comment-replies-toggle:hover { text-decoration: underline; }

.comment-replies > .comment-list {
    margin-top: 8px;
}
.comment-replies > .comment-list > .comment {
    margin-top: 14px;
}

.comment.depth-3 .comment-replies,
.comment.depth-4 .comment-replies,
.comment.depth-5 .comment-replies,
.comment.depth-6 .comment-replies {
    padding-left: 12px;
}

/* Pagination */
.comments-pagination {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.comments-pagination .page-link {
    display: inline-block;
    min-width: 34px;
    text-align: center;
    padding: 6px 10px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-sm);
    color: var(--ink-2);
    text-decoration: none;
    font-size: .9rem;
    background: var(--surface);
}
.comments-pagination .page-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}
.comments-pagination .page-link.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
}

/* Visually hidden labels (accessibility) */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}