/* ==========================================================================
   IC技术圈 — 专栏页样式
   Shared by columns.html / column_home.html / column_detail.html
   Added 2026-10-02.  Kept in one file so the three pages stay consistent.
   Accent #00b0f0 is the site colour (menu rule + .header band).
   ========================================================================== */

:root {
    --c-accent:      #00b0f0;
    --c-accent-dark: #0090c8;
    --c-ink:         #1f2328;
    --c-ink-2:       #4c5560;
    --c-ink-3:       #8b949e;
    --c-line:        #e9edf2;
    --c-line-soft:   #f2f5f8;
    --c-bg:          #f5f7fa;
    --c-card:        #ffffff;
    --c-link:        #12688f;
    --c-shadow:      0 8px 24px rgba(16, 48, 72, .09);
}

body {
    background: var(--c-bg);
    color: var(--c-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
                 "Noto Sans CJK SC", sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* the shared blue band — soften it slightly on the column pages */
.header {
    border-bottom: 1px solid var(--c-line) !important;
    letter-spacing: .08em;
    padding: .75rem;
}

.colpage {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 .75rem 3rem;
}

/* ---------- hero row ---------------------------------------------------- */
.col-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.75rem .25rem 1.25rem;
}
.col-hero h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: .02em;
}
.col-hero .sub {
    color: var(--c-ink-3);
    font-size: .875rem;
    margin-top: .4rem;
}
.col-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.col-actions .btn {
    border-radius: 999px;
    font-size: .875rem;
    padding: .35rem 1rem;
    border-width: 1px;
}

/* ---------- column card grid -------------------------------------------- */
.col-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1rem;
}

.col-card {
    background: var(--c-card);
    border: 1px solid var(--c-line);
    border-radius: 14px;
    padding: 1.15rem 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.col-card:hover {
    border-color: #cfe6f5;
    box-shadow: var(--c-shadow);
    transform: translateY(-2px);
}

.col-card-hd {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.col-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--c-line);
    background: #fff;
    flex: none;
}
.col-name {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
}
.col-name a {
    color: var(--c-ink);
    text-decoration: none;
}
.col-name a:hover {
    color: var(--c-accent-dark);
}
.col-badge {
    display: inline-block;
    font-size: .68rem;
    font-weight: 400;
    color: #0d7a46;
    background: #e9f8ef;
    border: 1px solid #cdebd9;
    border-radius: 999px;
    padding: 0 .5rem;
    margin-left: .4rem;
    vertical-align: 2px;
    letter-spacing: .02em;
}
.col-intro {
    color: var(--c-ink-2);
    font-size: .875rem;
    line-height: 1.65;
    margin: .7rem 0 .85rem;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* latest articles inside a card */
.col-posts {
    margin-top: auto;
    border-top: 1px solid var(--c-line-soft);
    padding-top: .5rem;
}
.col-post {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    padding: .3rem 0;
    font-size: .85rem;
    line-height: 1.5;
}
.col-post .dot {
    color: #c8d4de;
    flex: none;
}
.col-post a {
    color: var(--c-link);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.col-post a:hover {
    color: var(--c-accent-dark);
    text-decoration: underline;
}
.col-post .when {
    margin-left: auto;
    color: var(--c-ink-3);
    font-size: .78rem;
    flex: none;
}

.col-card-ft {
    margin-top: .75rem;
    padding-top: .6rem;
    border-top: 1px solid var(--c-line-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .8rem;
    color: var(--c-ink-3);
}
.col-card-ft a {
    color: var(--c-accent-dark);
    text-decoration: none;
}
.col-card-ft a:hover {
    text-decoration: underline;
}

/* ---------- column home: profile header --------------------------------- */
.profile {
    background: var(--c-card);
    border: 1px solid var(--c-line);
    border-radius: 16px;
    padding: 1.6rem 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.4rem;
    margin-bottom: 1.25rem;
}
.profile-logo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--c-line);
    background: #fff;
    flex: none;
}
.profile-main {
    min-width: 0;
    flex: 1;
}
.profile-name {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.3;
}
.profile-name .rss {
    margin-left: .5rem;
    vertical-align: -2px;
    color: var(--c-ink-3);
}
.profile-name .rss:hover {
    color: #ef8b2c;
}
.profile-intro {
    color: var(--c-ink-2);
    font-size: .9rem;
    line-height: 1.7;
    margin-top: .45rem;
    overflow-wrap: anywhere;
}
.profile-stats {
    display: flex;
    gap: 2rem;
    margin-left: auto;
    padding-left: 1.5rem;
    flex: none;
}
.profile-stats .n {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--c-accent-dark);
}
.profile-stats .k {
    font-size: .78rem;
    color: var(--c-ink-3);
}

/* ---------- section title ----------------------------------------------- */
.sec-title {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: 1.02rem;
    font-weight: 600;
    margin: 1.6rem .25rem .85rem;
}
.sec-title::before {
    content: "";
    width: 3px;
    height: 1em;
    border-radius: 2px;
    background: var(--c-accent);
}

/* ---------- collect cards ----------------------------------------------- */
.collect-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: .85rem;
}
.collect-card {
    background: var(--c-card);
    border: 1px solid var(--c-line);
    border-left: 3px solid #ffd27a;
    border-radius: 12px;
    padding: .95rem 1.1rem;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.collect-card:hover {
    box-shadow: 0 6px 18px rgba(16, 48, 72, .07);
    border-color: #cfe6f5;
    border-left-color: #ffbe4d;
}
.collect-card .t {
    font-size: .98rem;
    font-weight: 600;
}
.collect-card .t a {
    color: var(--c-ink);
    text-decoration: none;
}
.collect-card .t a:hover {
    color: var(--c-accent-dark);
}
.collect-card .d {
    color: var(--c-ink-2);
    font-size: .85rem;
    line-height: 1.6;
    margin-top: .35rem;
    overflow-wrap: anywhere;
}
.collect-card .c {
    color: var(--c-ink-3);
    font-size: .78rem;
    margin-top: .5rem;
}

/* ---------- article list ------------------------------------------------- */
.post-list {
    display: flex;
    flex-direction: column;
    gap: .7rem;
}
.post-item {
    background: var(--c-card);
    border: 1px solid var(--c-line);
    border-radius: 12px;
    padding: 1.05rem 1.25rem;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.post-item:hover {
    border-color: #cfe6f5;
    box-shadow: 0 6px 18px rgba(16, 48, 72, .07);
}
.post-title {
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.5;
}
.post-title a {
    color: var(--c-ink);
    text-decoration: none;
}
.post-title a:hover {
    color: var(--c-accent-dark);
}
.post-item.is-private .post-title a {
    color: var(--c-ink-2);
}
.post-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--c-ink-3);
    font-size: .8rem;
    margin-top: .35rem;
}
.post-meta a {
    color: var(--c-link);
    font-weight: 500;
    text-decoration: none;
}
.post-meta a:hover {
    color: var(--c-accent-dark);
    text-decoration: underline;
}
.post-summary {
    color: var(--c-ink-2);
    font-size: .885rem;
    line-height: 1.72;
    margin-top: .55rem;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-tools {
    margin-top: .5rem;
    font-size: .82rem;
    display: flex;
    gap: 1rem;
}
.post-tools a {
    text-decoration: none;
}

/* tag for the 私密 badge (Bootstrap 5 dropped .badge-success) */
.tag-private {
    display: inline-block;
    font-size: .68rem;
    color: #8a5a00;
    background: #fff6e0;
    border: 1px solid #ffe3a3;
    border-radius: 999px;
    padding: 0 .5rem;
    margin-left: .4rem;
    vertical-align: 2px;
}

/* ---------- 公众号 card -------------------------------------------------- */
.gzh-card {
    background: var(--c-card);
    border: 1px solid var(--c-line);
    border-radius: 14px;
    padding: 1.15rem 1.35rem;
    display: flex;
    align-items: center;
    gap: 1.35rem;
    margin-top: 1.25rem;
}
.gzh-card .gzh-t {
    font-weight: 600;
    margin-bottom: .35rem;
}
.gzh-card .gzh-d {
    color: var(--c-ink-2);
    font-size: .87rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
}
.gzh-card img {
    border-radius: 8px;
    border: 1px solid var(--c-line);
    flex: none;
}

/* ---------- article detail ---------------------------------------------- */
.article-wrap {
    max-width: 820px;
    margin: 0 auto;
}
.article-head {
    padding: 1.6rem .25rem .9rem;
}
#article_title {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: .01em;
    margin-bottom: .7rem;
}
.article-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--c-ink-3);
    font-size: .84rem;
}
.article-meta a {
    color: var(--c-link);
    text-decoration: none;
}
.article-meta a:hover {
    text-decoration: underline;
}
#article_summary {
    background: #f0f8fd;
    border-left: 3px solid var(--c-accent);
    border-radius: 0 10px 10px 0;
    color: var(--c-ink-2);
    font-size: .93rem;
    line-height: 1.8;
    margin: 1.1rem 0 1.5rem;
    padding: 1rem 1.25rem;
}
#article_body {
    font-size: 1rem;
    line-height: 1.9;
    color: #2b3238;
}
#article_body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
#article_body h2,
#article_body h3 {
    font-weight: 650;
    margin: 1.6em 0 .6em;
    line-height: 1.5;
}
#article_body h2 {
    font-size: 1.22rem;
}
#article_body h3 {
    font-size: 1.06rem;
}
#article_body p {
    margin: .9em 0;
}
#article_body pre {
    background: #f6f8fa;
    border: 1px solid var(--c-line);
    border-radius: 10px;
    padding: .9rem 1.1rem;
    overflow-x: auto;
    font-size: .875rem;
    line-height: 1.65;
}
#article_body code {
    background: #f6f8fa;
    border-radius: 4px;
    padding: .1em .35em;
    font-size: .9em;
}
#article_body pre code {
    background: none;
    padding: 0;
}
#article_body blockquote {
    border-left: 3px solid var(--c-line);
    color: var(--c-ink-2);
    margin: 1em 0;
    padding: .2em 1.1em;
}
#article_body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    font-size: .9rem;
}
#article_body th,
#article_body td {
    border: 1px solid var(--c-line);
    padding: .5em .7em;
}
#article_body th {
    background: var(--c-line-soft);
}

.article-foot {
    margin-top: 1.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--c-line);
    color: var(--c-ink-2);
    font-size: .9rem;
}
.article-foot a {
    color: var(--c-link);
}

/* ---------- comments ----------------------------------------------------- */
#comment_box {
    background: var(--c-card);
    border: 1px solid var(--c-line) !important;
    border-radius: 14px !important;
    margin: 1.25rem 0 0 !important;
    padding: 1.15rem 1.35rem !important;
}
.cmt-title {
    font-weight: 600;
    margin-bottom: .5rem;
}
.cmt-item {
    border-top: 1px solid var(--c-line-soft);
    padding: .7rem 0;
}
.cmt-item:first-of-type {
    border-top: none;
}
.cmt-meta {
    color: var(--c-ink-3);
    font-size: .78rem;
    margin-bottom: .2rem;
}
.cmt-body {
    white-space: pre-wrap;
    line-height: 1.7;
    font-size: .92rem;
}

/* ---------- related articles (rendered into #rand_3articles by JS) ------- */
#rand_3articles ul {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
}
#rand_3articles li {
    position: relative;
    padding: .45rem 0 .45rem 1.1rem;
    border-bottom: 1px solid var(--c-line-soft);
    font-size: .9rem;
}
#rand_3articles li::before {
    content: "·";
    position: absolute;
    left: .25rem;
    color: var(--c-accent);
    font-weight: 700;
}
#rand_3articles a {
    color: var(--c-link);
    text-decoration: none;
}
#rand_3articles a:hover {
    color: var(--c-accent-dark);
    text-decoration: underline;
}

/* ---------- home page: latest-articles grid ------------------------------ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
    text-align: left;
}
.news-item {
    background: var(--c-card);
    border: 1px solid var(--c-line);
    border-radius: 12px;
    padding: .85rem 1.05rem;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.news-item:hover {
    border-color: #cfe6f5;
    box-shadow: 0 6px 18px rgba(16, 48, 72, .07);
}
.news-item .t {
    font-size: .97rem;
    font-weight: 600;
    line-height: 1.5;
}
.news-item .t a {
    color: var(--c-ink);
    text-decoration: none;
}
.news-item .t a:hover {
    color: var(--c-accent-dark);
}
.news-item .m {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    color: var(--c-ink-3);
    font-size: .78rem;
    margin-top: .3rem;
}
.news-item .m a {
    color: var(--c-link);
    font-weight: 500;
    text-decoration: none;
}
.news-item .m a:hover {
    text-decoration: underline;
}
.news-item .s {
    color: var(--c-ink-2);
    font-size: .83rem;
    line-height: 1.62;
    margin-top: .4rem;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- follow / favourite buttons ---------------------------------- */
.act-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin: .3rem 0 1.1rem;
}
.act-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: var(--c-card);
    border: 1px solid var(--c-line);
    border-radius: 999px;
    color: var(--c-ink-2);
    font-size: .86rem;
    line-height: 1.4;
    padding: .34rem 1.1rem;
    transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.act-btn:hover {
    border-color: var(--c-accent);
    color: var(--c-accent-dark);
}
.act-btn.on {
    background: #eaf7fe;
    border-color: var(--c-accent);
    color: var(--c-accent-dark);
    font-weight: 600;
}
.act-note {
    color: var(--c-ink-3);
    font-size: .8rem;
}

/* ---------- section head with an inline search -------------------------- */
.sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1.6rem .25rem .85rem;
}
.sec-head .sec-title {
    margin: 0;
}
.sec-head .col-search {
    margin: 0;
    width: min(420px, 100%);
}

/* ---------- column search bar ------------------------------------------- */
.col-search {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: .85rem 0 0;
}
.col-search input[type="search"] {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--c-line);
    border-radius: 999px;
    background: var(--c-card);
    padding: .45rem 1rem;
    font-size: .88rem;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.col-search input[type="search"]:focus {
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px rgba(0, 176, 240, .12);
}
.col-search button {
    flex: none;
    border: 1px solid var(--c-accent);
    border-radius: 999px;
    background: var(--c-accent);
    color: #fff;
    font-size: .86rem;
    padding: .45rem 1.2rem;
    transition: background .18s ease;
}
.col-search button:hover {
    background: var(--c-accent-dark);
    border-color: var(--c-accent-dark);
}
.col-search-note {
    color: var(--c-ink-3);
    font-size: .84rem;
    margin: 0 .25rem .85rem;
}
.col-search-note b {
    color: var(--c-ink-2);
    font-weight: 600;
}
.col-search-note a {
    color: var(--c-link);
    margin-left: .5rem;
}
.col-empty {
    background: var(--c-card);
    border: 1px dashed var(--c-line);
    border-radius: 14px;
    color: var(--c-ink-3);
    font-size: .9rem;
    padding: 2.5rem 1rem;
    text-align: center;
}

/* ---------- pagination / misc ------------------------------------------- */
.pagination .page-link {
    color: var(--c-link);
    border-color: var(--c-line);
}
.pagination .active .page-link {
    background: var(--c-accent);
    border-color: var(--c-accent);
    color: #fff;
}
.col-foot {
    text-align: center;
    color: var(--c-ink-3);
    font-size: .82rem;
    margin: 1.5rem 0 0;
}

@media (max-width: 575.98px) {
    .col-hero {
        padding-top: 1.25rem;
    }
    .col-hero h1 {
        font-size: 1.28rem;
    }
    .col-grid {
        grid-template-columns: 1fr;
    }
    .profile {
        flex-direction: column;
        text-align: center;
        padding: 1.4rem 1.1rem;
    }
    .profile-stats {
        justify-content: center;
        margin-left: 0;
        padding-left: 0;
        margin-top: .9rem;
    }
    .gzh-card {
        flex-direction: column-reverse;
        text-align: center;
    }
    #article_title {
        font-size: 1.3rem;
    }
}
