/* ============================================
   HELPFUL THINGS — extends style.css
   ============================================ */

/* Override body padding for the three-panel layout */
.ht-body {
    padding: 0;
    max-width: 100%;
}

.ht-body header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ── PAGE INTRO ── */
.ht-page-intro {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 20px 18px;
    border-bottom: 1px solid #ddd;
}

.ht-page-title {
    font-family: "IM Fell English", Georgia, serif;
    font-size: 1.5em;
    font-weight: normal;
    color: #333;
    margin-bottom: 4px;
}

.ht-page-desc {
    font-size: 0.9em;
    color: #999;
    font-style: italic;
}

/* ── THREE-PANEL LAYOUT ── */
.ht-layout {
    display: grid;
    grid-template-columns: 190px 300px 1fr;
    max-width: 1400px;
    margin: 0 auto;
    height: calc(100vh - 175px);
    overflow: hidden;
    border-top: 1px solid #ddd;
}

/* ── TAG SIDEBAR ── */
.ht-sidebar {
    border-right: 1px solid #ddd;
    padding: 20px 15px;
    overflow-y: auto;
}

.ht-sidebar-heading {
    font-family: Georgia, serif;
    font-size: 0.72em;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #aaa;
    font-weight: normal;
    margin-bottom: 14px;
}

.ht-tag-list {
    list-style: none;
}

.ht-tag-list li {
    margin-bottom: 2px;
}

.ht-tag {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-radius: 3px;
    font-style: normal !important;
    font-size: 0.92em;
    color: #555 !important;
    text-decoration: none !important;
    transition: background 0.12s;
}

.ht-tag:hover {
    background: #f5f5f5;
    color: #333 !important;
    text-decoration: none !important;
}

.ht-tag.active {
    background: #333;
    color: #fff !important;
}

.ht-tag-count {
    font-size: 0.75em;
    color: #aaa;
}

.ht-tag.active .ht-tag-count {
    color: #aaa;
}

/* ── POST LIST PANEL ── */
.ht-post-list-panel {
    border-right: 1px solid #ddd;
    overflow-y: auto;
}

.ht-list-header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid #ddd;
    font-size: 0.72em;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #aaa;
    font-family: Georgia, serif;
}

.ht-post-list {
    list-style: none;
}

.ht-post-list li {
    border-bottom: 1px solid #eee;
}

.ht-post-link {
    display: block;
    padding: 14px 16px;
    text-decoration: none !important;
    color: #444 !important;
    font-style: normal !important;
    transition: background 0.1s;
}

.ht-post-link:hover {
    background: #f9f9f9;
    text-decoration: none !important;
}

.ht-post-link.active {
    background: #f4f2ef;
    border-left: 2px solid #333;
    padding-left: 14px;
}

.ht-post-list-title {
    font-size: 0.95em;
    line-height: 1.4;
    margin-bottom: 5px;
    color: #333;
}

.ht-post-list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.ht-pill {
    background: #eee;
    border-radius: 2px;
    padding: 2px 6px;
    font-size: 0.72em;
    color: #777;
    letter-spacing: 0.03em;
}

/* ── POST READER ── */
.ht-reader {
    overflow-y: auto;
    padding: 30px 40px;
}

.ht-article {
    display: none;
    max-width: 620px;
}

.ht-article.visible {
    display: block;
}

.ht-article-topics {
    font-size: 0.75em;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: 8px;
}

.ht-article-title {
    font-family: "IM Fell English", Georgia, serif;
    font-size: 1.8em;
    font-weight: normal;
    line-height: 1.25;
    color: #222;
    margin-bottom: 6px;
}

.ht-article-date {
    font-size: 0.82em;
    color: #aaa;
    font-style: italic;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.ht-article-body {
    font-size: 0.98em;
    line-height: 1.8;
    color: #333;
}

.ht-article-body p {
    margin-bottom: 1.2em;
}

.ht-article-body h2 {
    font-family: "IM Fell English", Georgia, serif;
    font-size: 1.2em;
    font-weight: normal;
    margin: 1.8em 0 0.6em;
    color: #333;
}

.ht-article-body ul,
.ht-article-body ol {
    padding-left: 1.4em;
    margin-bottom: 1.2em;
}

.ht-article-body li {
    margin-bottom: 0.4em;
}

.ht-article-body code {
    background: #f2f0ed;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 0.86em;
    font-family: "Courier New", monospace;
    color: #555;
}

.ht-article-body pre {
    background: #f2f0ed;
    padding: 14px 18px;
    border-radius: 3px;
    overflow-x: auto;
    margin-bottom: 1.2em;
}

.ht-article-body pre code {
    background: none;
    padding: 0;
}

.ht-article-body a {
    color: #555 !important;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-style: normal;
}

.ht-empty-state {
    color: #ccc;
    font-style: italic;
    font-size: 0.9em;
    margin-top: 60px;
}

/* ── SINGLE POST PAGE (direct URL) ── */
.ht-single-main {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 20px 60px;
}

.ht-single-back {
    margin-top: 3em;
    padding-top: 1.5em;
    border-top: 1px solid #ddd;
    font-size: 0.88em;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .ht-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
        height: auto;
    }

    .ht-sidebar {
        border-right: none;
        border-bottom: 1px solid #ddd;
        padding: 14px;
    }

    .ht-tag-list {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .ht-post-list-panel {
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .ht-reader {
        padding: 24px 16px;
    }
}
