/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background-color: #1a1625;
    color: #d896ff;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Header / Hero */
.nav-container {
    background: transparent;
    border: 0;
    padding: 0.5rem 0 0;
}

.hero {
    text-align: center;
    margin: 0.25rem 0 0.5rem;
}

/* Remove global link underline/border from the ASCII header link */
a.ascii-header {
    display: block;
    text-decoration: none;
    border-bottom: none;
    color: inherit;
}
a.ascii-header:hover {
    border-bottom: none;
}

/* Override global pre styles for the ASCII hero only */
.hero pre {
    display: inline-block;
    font-family: 'Courier New', monospace;
    white-space: pre;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0.25rem 0 0.35rem;
    color: #d896ff;
}

.site-slogan {
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.3;
    margin: 0.15rem 0 0.3rem;
}
.site-slogan .slogan-em {
    color: #c9a66b; /* tan accent */
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.nav {
    position: sticky;
    top: 0;
    background-color: #1a1625;
    border-bottom: 2px solid #8b6f47;
    padding: 0.75rem 1rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    font-family: 'Courier New', monospace;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: bold;
    color: #d896ff;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #9b72cf;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.5rem;
    border: 1px solid transparent;
}

.nav-link:hover {
    color: #d896ff;
    border-color: #8b6f47;
}

.nav-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #8b6f47;
    font-size: 0.8rem;
}

.nav-timestamp {
    font-family: 'Courier New', monospace;
    color: #5a6b4d;
}

.nav-rss {
    font-size: 0.8rem;
    color: #c9a66b;
}

/* Content */
.content {
    flex: 1;
    padding: 2rem 0;
}

/* Typography */
h1, h2, h3 {
    color: #9b72cf;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #8b6f47;
    padding-bottom: 0.5rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1.5rem;
}

/* Links */
a {
    color: #c9a66b;
    text-decoration: none;
    border-bottom: 1px solid #8b6f47;
}

a:hover {
    color: #d896ff;
    border-bottom-color: #d896ff;
}

/* Tool Cards */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.tool-card {
    background-color: #2d1b3d;
    border: 2px solid #8b6f47;
    padding: 1.5rem;
    transition: transform 0.2s;
}

.tool-card:hover {
    transform: translateY(-2px);
    border-color: #9b72cf;

}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background-color: #5a6b4d;
    color: #c9a66b;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 2px;
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 2rem 0;
    text-align: center;
    border-top: 2px solid #8b6f47;
}

.footer-content {
    color: #c9a66b; /* tan */
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}
.footer-links a {
    color: #c9a66b;
}
.footer-links a:hover {
    color: #d896ff;
}
.footer-links span[aria-hidden="true"] {
    color: #8b6f47;
}

.uptime-counters {
    margin-top: 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #8b6f47;
    text-align: center;
}
.uptime-line {
    margin: 0.25rem 0;
}
.uptime-line span {
    color: #c9a66b;
    font-weight: 600;
}

.ascii-art {
    font-family: monospace;
    white-space: pre;
    color: #d896ff;
    margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }

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

    /* Mobile hero optimizations */
    .hero pre {
        font-size: 0.5rem;
        line-height: 1;
        margin: 0.15rem 0 0.25rem;
    }

    .site-slogan {
        font-size: 0.875rem;
        line-height: 1.4;
        padding: 0 0.5rem;
    }

    .ascii-divider {
        font-size: 0.8rem;
        margin: 0.35rem 0;
    }

    /* Mobile navigation */
    .home-nav .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .home-nav .nav-meta {
        font-size: 0.75rem;
    }

    /* Mobile footer */
    .footer {
        padding: 1.5rem 0;
    }

    .footer-content {
        font-size: 0.8rem;
    }

    .footer-links {
        font-size: 0.85rem;
        gap: 0.5rem;
        flex-direction: column;
        margin-top: 0.75rem;
    }

    .footer-links span[aria-hidden="true"] {
        display: none;
    }

    .uptime-counters {
        font-size: 0.75rem;
        margin-top: 0.5rem;
    }

    /* Mobile content spacing */
    .content {
        padding: 1rem 0;
    }

    .container {
        padding: 0 0.75rem;
    }
}

/* Terminal Headers */
.terminal-header {
    background: #1a1625;
    border: 2px solid #8b6f47;
    padding: 1rem;
    margin: 2rem 0;
    font-family: 'Courier New', monospace;
}

.terminal-header pre {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    color: #d896ff;
    overflow-x: auto;
    white-space: pre;
}

/* Category Sections */
.category-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #2d1b3d;
    border-left: 4px solid #9b72cf;
}

.category-section h2 {
    color: #d896ff;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #8b6f47;
    padding-bottom: 0.5rem;
}

.category-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-section li {
    margin: 0.5rem 0;
    color: #c9a66b;
    font-family: 'Courier New', monospace;
}

/* Tool Cards Enhanced */
.tool-card {
    background-color: #2d1b3d;
    border: 2px solid #8b6f47;
    padding: 1.5rem;
    transition: transform 0.2s;
    position: relative;
}

.tool-card:hover {
    transform: translateY(-2px);
    border-color: #9b72cf;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #9b72cf;
    transform: scaleX(0);
    transition: transform 0.2s;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card h3 {
    color: #d896ff;
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
    border-bottom: none;
}

.tool-card p {
    color: #c9a66b;
    margin: 0.5rem 0;
    font-family: 'Courier New', monospace;
}

/* Tags Enhanced */
.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background-color: #1a1625;
    color: #9b72cf;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
    border: 1px solid #8b6f47;
}

/* Code Blocks */
pre, code {
    background-color: #2d1b3d;
    border: 1px solid #8b6f47;
    padding: 0.2em 0.4em;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
}

pre {
    padding: 1rem;
    margin: 1.5rem 0;
}

pre code {
    border: none;
    padding: 0;
}

/* ASCII Decorations */
.ascii-divider {
    font-family: 'Courier New', monospace;
    color: #8b6f47;
    text-align: center;
    margin: 2rem 0;
    white-space: pre;
}

/* Stats Block */
.stats-block {
    background: #1a1625;
    border: 1px solid #8b6f47;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    color: #9b72cf;
    margin: 1.5rem 0;
}

.stats-block pre {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
}

/* Quick Links */
.quick-links {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.quick-link {
    padding: 0.5rem 1rem;
    background: #2d1b3d;
    border: 1px solid #8b6f47;
    color: #d896ff;
    text-decoration: none;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.quick-link:hover {
    border-color: #9b72cf;
    background: #1a1625;
}

/* Back Link */
.back-link {
    display: inline-block;
    margin: 2rem 0;
    padding: 0.5rem 1rem;
    color: #8b6f47;
    text-decoration: none;
    font-family: 'Courier New', monospace;
    border: 1px solid #8b6f47;
}

.back-link:hover {
    color: #d896ff;
    border-color: #9b72cf;
}

/* Tool of the Week styles */
.tool-of-week {
    background-color: #241a2b;
    border: 2px solid #8b6f47;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.home-nav {
    text-align: center;
    margin: 0.5em 0;
}
.home-nav .nav-links {
    display: flex;
    justify-content: center;
    gap: 1em;
}
.home-nav .nav-meta {
    margin-top: 0.5em;
}

.tool-of-week header h2 {
    color: #d896ff;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.tool-of-week .meta {
    color: #c9a66b;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.tool-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #9b72cf;
    display: block;
    margin: 0.75rem 0;
}

.tool-of-week .lead {
    color: #d896ff;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.tool-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    color: #c9a66b;
}

.callout {
    background: rgba(155,114,207,0.05);
    border-left: 4px solid #9b72cf;
    padding: 0.75rem;
    margin: 0.75rem 0;
}

.mastodon-template pre {
    white-space: pre-wrap;
    background: transparent;
    border: 1px dashed #5a6b4d;
    padding: 0.5rem;
    color: #c9a66b;
}
/* Ensure ASCII hero never shows a horizontal scrollbar */
.hero pre {
    overflow: visible;
    overflow-x: visible;
    overflow-y: visible;
}

/* --- Search & Tags styles --- */
.main-nav {
    margin: 0.5rem auto 0.75rem;
    text-align: center;
}
.nav-icons {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(8ch, 1fr));
    gap: 0.5rem 1.25rem;
    padding: 0;
    margin: 0.25rem auto 0.5rem;
    align-items: center;
    justify-content: center;
    max-width: 24rem;
}
.nav-icons li { text-align: center; }
.nav-icon {
    display: block;
    text-decoration: none;
    color: #c9a66b; /* tan */
    border-bottom: none;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.02em;
    padding: 0.15rem 0.25rem;
}
.nav-icon:hover { color: #d896ff; }

.tag-search { display: flex; gap: 0.5rem; align-items: center; justify-content: center; margin-top: 0.5rem; }
.tag-search input[type="search"] {
    padding: 0.4rem;
    width: 100%;
    max-width: 28rem;
    border: 1px solid #8b6f47;
    background: transparent;
    color: #c9a66b;
}
.tag-search button { padding: .35rem .6rem; background: #2d1b3d; border: 1px solid #8b6f47; color: #d896ff; }
.tag-search button:hover { border-color: #9b72cf; }

.visually-hidden { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.tags-results-list { list-style: none; padding: 0; margin: 0.5rem 0; }
.tags-item { padding: 0.5rem 0; border-bottom: 1px solid #8b6f47; }
.tags-item-title { font-weight: 700; color: #d896ff; text-decoration: none; border-bottom: none; }
.tags-item-desc { color: #c9a66b; margin: 0.25rem 0; font-family: 'Courier New', monospace; }
.tags-item-tags { margin: 0.25rem 0; font-size: 0.9rem; color: #c9a66b; }
.tag-link, .resource-tag { display:inline-block; padding:0.1rem 0.4rem; margin-right:0.35rem; background:#1a1625; color:#c9a66b; text-decoration:none; border: 1px solid #8b6f47; border-radius:2px; }
.tag-link:hover, .resource-tag:hover { background:#2d1b3d; }

.resource-desc { color: #c9a66b; margin: 0.25rem 0 0.75rem; }
.resource-footer { margin-top: 1rem; }

@media (max-width: 768px) {
    .nav-icons { gap: 0.5rem 1rem; }
}

