/* ============================================================
   DEZINFORMACE+ — Public Stylesheet
   Dark editorial theme · Fraunces + Outfit
   ============================================================ */

/* --- Theme Variables --- */
:root {
    --bg: #161a23;
    --bg-deep: #12151c;
    --surface: #1e2330;
    --surface-hover: #252a38;
    --border: #2a2f3d;
    --border-light: #353a4c;
    --text: #ffffff;
    --text-secondary: #ffffff;
    --text-dim: #9a9895;
    --accent: #d4a574;
    --accent-hover: #e0b68a;
    --accent-soft: rgba(212, 165, 116, 0.08);
    --link: #a3cce8;
    --link-hover: #c0ddf0;
    --success: #7ab88f;
    --error: #d47474;
    --info: #7a9ec8;
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Outfit', system-ui, sans-serif;
    --radius: 8px;
    --radius-lg: 12px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-size: 17px;
}

.sidebar,
.content,
.site-header,
.site-footer {
    font-size: 17px;
}

a {
    color: var(--link);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--link-hover);
}

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

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    line-height: 1.3;
    font-weight: 600;
    color: var(--accent);
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0.5rem 0;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

/* --- Subtle page entrance --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Header --- */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1rem 1.5rem;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 100;
    flex-wrap: nowrap;
}

/* Accent stripe at top of page */
.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--link), var(--accent));
    opacity: 0.7;
}

.header-left {
    flex: 0 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--text);
    text-decoration: none;
    transition: opacity 0.2s;
}

.logo:hover {
    color: var(--text);
    text-decoration: none;
    opacity: 0.85;
}

.logo-svg {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    opacity: 0.9;
}

.logo-svg circle,
.logo-svg line {
    stroke: var(--accent);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.site-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
    color: var(--text);
}

.site-subtitle {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-dim);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.header-center {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
    overflow: hidden;
}

.banner-img {
    max-height: 120px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: var(--radius);
    opacity: 0.95;
}

.header-right {
    flex: 0 0 auto;
    max-width: 280px;
}

.about-box {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.7rem 1rem;
    background: var(--surface);
    max-height: 5.5rem;
    overflow: hidden;
}

.about-box h3 {
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.15rem;
}

.about-box p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- About popup --- */
.about-box {
    cursor: pointer;
}

.about-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 500;
    justify-content: center;
    align-items: center;
}

.about-popup-overlay.open {
    display: flex;
}

.about-popup {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    max-width: 420px;
    width: 90%;
    position: relative;
}

.about-popup h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.about-popup p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.about-popup-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}

.about-popup-close:hover {
    color: var(--text);
}

/* --- Sidebar About (mobile only) --- */
.sidebar-about {
    display: none;
}

/* --- Hamburger (mobile only) --- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 9px;
    z-index: 200;
    position: relative;
    transition: border-color 0.2s;
}

.hamburger:hover {
    border-color: var(--accent);
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Layout --- */
.layout {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* --- Sidebar --- */
.sidebar {
    width: 280px;
    min-width: 280px;
    background: var(--bg-deep);
    border-right: 1px solid var(--border);
    padding: 1.25rem 0;
    overflow-y: auto;
    align-self: stretch;
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.sidebar nav {
    padding: 0 0.85rem;
}

/* Main category list */
.menu-categories {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-btn {
    display: block;
    padding: 0.6rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

.menu-btn:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
    transform: translateX(2px);
}

.menu-btn.active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--accent);
}

/* Sub-menu (category links) */
.menu-back {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: all 0.2s ease;
}

.menu-back:hover {
    color: var(--accent);
    text-decoration: none;
    transform: translateX(-2px);
}

.menu-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.menu-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.menu-links li a {
    display: block;
    padding: 0.45rem 0.7rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    border-radius: 6px;
    transition: all 0.15s ease;
    text-decoration: none;
}

.menu-links li a:hover {
    background: var(--surface);
    color: var(--accent);
    text-decoration: none;
    padding-left: 0.85rem;
}

.menu-links .separator {
    padding: 0.3rem 0;
}

.menu-links .separator hr {
    border-top-color: var(--border);
}

.menu-label {
    display: block;
    padding: 0.5rem 0.7rem 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* --- Main Content --- */
.content {
    flex: 1;
    padding: 2rem 2.5rem;
    min-width: 0;
    overflow-wrap: break-word;
    animation: fadeIn 0.35s ease-out;
}

.content h1 {
    font-size: 1.9rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.content h2 {
    font-size: 1.45rem;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.content h3 {
    font-size: 1.2rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.content p {
    margin-bottom: 0.85rem;
    color: var(--text);
}

.content ul, .content ol {
    margin-left: 1.5rem;
    margin-bottom: 0.85rem;
}

.content ul {
    list-style: disc;
}

.content ol {
    list-style: decimal;
}

.content li {
    margin-bottom: 0.35rem;
    color: var(--text);
}

.content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1.25rem;
    margin: 1.25rem 0;
    color: var(--text);
    font-style: italic;
}

.content pre {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.content code {
    background: var(--surface);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}

.content pre code {
    background: none;
    padding: 0;
}

.content img {
    border-radius: var(--radius);
    margin: 1rem 0;
}

.content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.content th,
.content td {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.content th {
    background: var(--surface);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.content td {
    color: var(--text);
}

.content tr:last-child td {
    border-bottom: none;
}

/* --- Flash Messages --- */
.flash {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 1rem;
    border: 1px solid transparent;
}

.flash-success {
    background: rgba(122, 184, 143, 0.08);
    border-color: rgba(122, 184, 143, 0.2);
    color: var(--success);
}

.flash-error {
    background: rgba(212, 116, 116, 0.08);
    border-color: rgba(212, 116, 116, 0.2);
    color: var(--error);
}

.flash-info {
    background: rgba(122, 158, 200, 0.08);
    border-color: rgba(122, 158, 200, 0.2);
    color: var(--info);
}

/* --- Forms --- */
.form-group {
    margin-bottom: 1.1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.35rem;
    background: var(--accent);
    color: var(--bg-deep);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.4;
}

.btn:hover {
    background: var(--accent-hover);
    color: var(--bg-deep);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.2);
}

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.88rem;
}

.btn-danger {
    background: var(--error);
    color: #fff;
}

.btn-danger:hover {
    background: #e08585;
    box-shadow: 0 4px 12px rgba(212, 116, 116, 0.2);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    color: var(--text);
    transform: none;
    box-shadow: none;
}

/* --- Message Cards --- */
.message-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.35rem;
    margin-bottom: 0.85rem;
    transition: border-color 0.2s;
}

.message-card:hover {
    border-color: var(--border-light);
}

.message-card .message-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.message-card .message-author {
    font-weight: 600;
    color: var(--accent);
}

.message-card .message-body {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.message-card .message-reply {
    margin-top: 0.7rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--border);
    color: var(--success);
    font-size: 0.95rem;
}

.message-card .message-reply strong {
    color: #68a97e;
}

/* --- Article --- */
.article-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.article-header h1 {
    margin-bottom: 0.3rem;
}

.article-meta {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.article-content {
    line-height: 1.8;
    color: var(--text);
}

.article-content p {
    margin-bottom: 1.1rem;
}

.admin-edit-link {
    font-size: 0.85rem;
    margin-top: 1rem;
    text-align: right;
}

.admin-edit-link a {
    color: var(--text-dim);
    text-decoration: none;
    border-bottom: 1px dashed var(--text-dim);
}

.admin-edit-link a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.article-author {
    font-size: 0.92rem;
    color: var(--text-dim);
    margin-top: 0.75rem;
    text-align: right;
}

/* --- Sent Items (public page) --- */
.content .sent-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

.content .sent-item:hover {
    border-color: var(--border-light);
}

.content .sent-item h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin: 0 0 0.35rem;
    color: var(--text);
}

.content .sent-meta {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
}

.content .sent-content {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.content .sent-reply {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--accent-soft);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.content .sent-reply strong {
    color: var(--accent);
}

/* --- Page links (is_page categories) --- */
.page-links-list {
    margin-top: 0.5rem;
    list-style: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.page-links-list li {
    padding-left: 0.75rem;
    position: relative;
}

.page-links-list li::before {
    content: '›';
    position: absolute;
    left: 0;
    top: -0.25em;
    color: var(--accent);
    font-weight: 700;
}

.page-links-list li a {
    display: block;
    padding: 0;
    line-height: 1.5;
    color: var(--link);
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.15s ease;
}

.page-links-list li a:hover {
    color: var(--accent);
    text-decoration: none;
}

.page-links-list .external-icon {
    color: var(--text-dim);
    font-size: 0.8em;
    margin-left: 0.15rem;
}

.page-links-separator {
    padding: 0;
    padding-left: 0;
}

.page-links-separator::before,
.page-links-label::before {
    content: none;
}

.page-links-separator hr {
    border-top: 2px solid var(--border-light);
    margin: 0.4rem 0;
}

.page-links-label {
    padding: 0.75rem 0 0.2rem;
    padding-left: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: none;
}

/* --- Message form (public) --- */
.message-form {
    max-width: 600px;
}

.message-form .cf-turnstile {
    margin-bottom: 1rem;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    margin-top: 1.75rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    height: 2.2rem;
    padding: 0 0.55rem;
    border-radius: var(--radius);
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination a {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

.pagination .current {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: var(--bg-deep);
    font-weight: 700;
}

.pagination .pagination-info {
    color: var(--text-dim);
    font-size: 0.88rem;
}

/* --- 404 Page --- */
.page-404 {
    text-align: center;
    padding: 4rem 1rem;
}

.page-404 h1 {
    font-size: 3.5rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.page-404 p {
    font-size: 1.1rem;
    color: var(--text-dim);
}

/* --- Footer --- */
.site-footer {
    background: var(--bg-deep);
    border-top: 1px solid var(--border);
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-top: auto;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-dim);
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-counter {
    font-size: 0.72rem;
    color: var(--border-light);
    white-space: nowrap;
    flex-shrink: 0;
}

/* --- Code display --- */
code {
    font-family: "SF Mono", "Consolas", "Liberation Mono", "Menlo", monospace;
}

/* ============================================================
   Responsive — Mobile (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
    .site-header {
        flex-wrap: wrap;
        padding: 0.75rem 1rem;
        gap: 0.6rem;
    }

    .header-left {
        flex: 1;
    }

    .header-center {
        order: 3;
        flex-basis: calc(100% + 2rem);
        margin: 0 -1rem -0.75rem;
    }

    .header-center .banner-img {
        width: 100%;
        max-height: none;
        object-fit: cover;
        border-radius: 0;
    }

    .header-right {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -300px;
        width: 275px;
        min-width: 275px;
        height: 100vh;
        z-index: 150;
        transition: left 0.3s ease;
        padding-top: 1.25rem;
        box-shadow: none;
    }

    .sidebar.open {
        left: 0;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.6);
    }

    .sidebar-about {
        display: block;
        margin-top: auto;
        padding: 0.75rem 1rem;
        border-top: 1px solid var(--border);
        cursor: pointer;
    }

    .sidebar-about h4 {
        font-family: var(--font-display);
        font-size: 0.88rem;
        font-weight: 600;
        color: var(--accent);
        margin-bottom: 0.2rem;
    }

    .sidebar-about p {
        font-size: 0.8rem;
        color: var(--text-secondary);
        line-height: 1.45;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .content {
        padding: 1.25rem 1rem;
    }

    .content table {
        display: block;
        overflow-x: auto;
    }

    .site-footer {
        flex-direction: column;
        gap: 0.4rem;
    }

    .footer-counter {
        position: static;
    }
}

/* ============================================================
   Responsive — Small Mobile (max-width: 480px)
   ============================================================ */
@media (max-width: 480px) {
    .site-name {
        font-size: 1rem;
    }

    .site-subtitle {
        font-size: 0.62rem;
    }

    .logo-svg {
        width: 32px;
        height: 32px;
    }

    .content {
        padding: 1rem 0.85rem;
    }

    .content h1 {
        font-size: 1.4rem;
    }
}

/* --- Search --- */
.sidebar-search {
    display: flex;
    gap: 6px;
    padding: 0 0.85rem;
    margin-top: 1.25rem;
}

.sidebar-search input {
    flex: 1;
    min-width: 0;
    padding: 0.45rem 0.7rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.sidebar-search input::placeholder {
    color: var(--text-dim);
}

.sidebar-search input:focus {
    outline: none;
    border-color: var(--accent);
}

.sidebar-search button {
    padding: 0.45rem 0.4rem;
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.sidebar-search button:hover {
    color: var(--accent);
}

.search-empty {
    color: var(--text-secondary);
    font-style: italic;
}

.search-section {
    margin-bottom: 2rem;
}

.search-section h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--accent);
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.search-result {
    margin-bottom: 1.25rem;
}

.search-result h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.search-result h3 a {
    color: var(--link);
    text-decoration: none;
}

.search-result h3 a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.search-excerpt {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.search-excerpt mark {
    background: var(--accent-soft);
    color: var(--accent);
    padding: 0.1em 0.2em;
    border-radius: 3px;
}

/* ============================================================
   Utility classes
   ============================================================ */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-dim);
}

.text-small {
    font-size: 0.82rem;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

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

/* --- Custom select arrow (inset from right edge) --- */
body select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a09d96' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.2rem;
}

body select::-ms-expand {
    display: none;
}
