/* ============================================================
   Sylvaris Ghost Theme v2 — screen.css
   Canopy dark palette · Ghost Starter conventions
   ============================================================ */

/* ── CSS Variables (defaults overridden by default.hbs inline style) ── */
:root {
    /* Backgrounds — Canopy dark charcoal */
    --bg:           #1a1a1a;
    --surface:      #262626;
    --surface2:     #2e2e2e;
    --border:       rgba(156, 201, 182, 0.18);
    --border-strong:rgba(156, 201, 182, 0.35);

    /* Text */
    --text:         #e5e5e5;
    --text-secondary:#ababab;
    --text-muted:   #737373;

    /* Canopy accent — soft sage green (from webapp) */
    --accent:       #9cc9b6;
    --accent-mid:   #85b8a3;
    --accent-dark:  #739f8c;
    --accent-dim:   rgba(156, 201, 182, 0.12);

    /* Folium accent — neutral (no loud color) */
    --folium:       #ababab;
    --folium-dim:   rgba(171, 171, 171, 0.10);

    /* Category tag colors */
    --tag-ai:       #a78bfa;
    --tag-dev:      #38bdf8;
    --tag-infra:    #fb923c;
    --tag-security: #f87171;
    --tag-hardware: #fbbf24;
    --tag-business: #34d399;

    /* Typography */
    --font-sans:    'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
    --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

    /* Layout */
    --nav-height:   56px;
    --container:    1400px;
    --content-width:720px;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(156, 201, 182, 0.3); border-radius: 2px; }

/* ================================================================
   GHOST VIEWPORT + LAYOUT SHELL
   ================================================================ */

.gh-viewport {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.gh-main {
    flex: 1;
}

/* ── Navigation ── */
.gh-head {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    height: var(--nav-height);
    overflow: visible; /* allow search dropdown, but keep children in flow */
}

.gh-head-inner {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
    padding: 0 2rem;
    max-width: var(--container);
    margin: 0 auto;
    gap: 1rem;
}

/* Logo */
.gh-head-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-width: 0;
}

.gh-head-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
    white-space: nowrap;
    text-decoration: none;
}

.gh-head-logo img {
    height: 28px;
    width: auto;
    flex-shrink: 0;
}

/* Ghost built-in navigation */
.gh-head-menu {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
}

.gh-head-menu .nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.gh-head-menu .nav li {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.gh-head-menu .nav li a {
    display: block;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid transparent;
    transition: all 0.15s;
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-decoration: none;
}

.gh-head-menu .nav li a:hover {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: var(--border);
}

.gh-head-menu .nav li.nav-current a,
.gh-head-menu .nav li.current a {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: var(--border-strong);
}

/* Head actions */
.gh-head-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-width: 0;
}

.gh-head-actions-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

/* Ghost search icon */
.gh-search-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.15s;
}

.gh-search-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Members buttons */
.gh-button {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.15s;
    border: 1px solid var(--border-strong);
    color: var(--accent);
    background: var(--accent-dim);
}

.gh-button:hover {
    background: rgba(156, 201, 182, 0.2);
    border-color: var(--accent);
}

/* Clock */
.nav-clock {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Hamburger — mobile only */
.gh-burger {
    display: none;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
}

/* ── Footer ── */
.gh-foot {
    border-top: 1px solid var(--border);
    padding: 1.25rem 2rem;
}

.gh-foot .gh-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    max-width: var(--container);
    margin: 0 auto;
}

.gh-foot-menu .nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.gh-foot-menu .nav li a {
    font-size: 0.78rem;
    color: var(--text-muted);
    transition: color 0.15s;
}

.gh-foot-menu .nav li a:hover { color: var(--accent); }

.gh-foot-meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ================================================================
   FEED LAYOUT (3-column: index + tag pages)
   ================================================================ */

.sylv-feed-layout {
    display: grid;
    grid-template-columns: 220px 1fr 280px;
    grid-template-areas: "sidebar-left feed sidebar-right";
    max-width: var(--container);
    margin: 0 auto;
    min-height: calc(100vh - var(--nav-height));
}

/* ── Left Sidebar ── */
.sylv-sidebar-left {
    grid-area: sidebar-left;
    border-right: 1px solid var(--border);
    padding: 1.5rem 1rem;
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height));
    overflow-y: auto;
}

.sylv-sidebar-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0 8px;
    margin-bottom: 8px;
    display: block;
}

.sylv-category-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 2rem;
}

.sylv-category-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 7px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
    transition: all 0.15s;
}

.sylv-category-item:hover {
    background: var(--surface);
    color: var(--text);
}

.sylv-category-item.active {
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 500;
}

.sylv-category-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--text-muted);
}

.sylv-category-dot.canopy-ai       { background: var(--tag-ai); }
.sylv-category-dot.canopy-dev      { background: var(--tag-dev); }
.sylv-category-dot.canopy-infra    { background: var(--tag-infra); }
.sylv-category-dot.canopy-security { background: var(--tag-security); }
.sylv-category-dot.canopy-hardware { background: var(--tag-hardware); }
.sylv-category-dot.canopy-business { background: var(--tag-business); }

.sylv-category-count {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
}

.sylv-sidebar-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0.75rem 8px 1rem;
}

/* ── Main Feed ── */
.sylv-feed {
    grid-area: feed;
    padding: 1.5rem 2rem;
    border-right: 1px solid var(--border);
    min-width: 0;
}

.sylv-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sylv-feed-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}

.sylv-feed-dot {
    width: 9px;
    height: 9px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
    animation: sylv-pulse 2s infinite;
}

.sylv-feed-dot.folium { background: var(--folium); }

@keyframes sylv-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.45; transform: scale(0.82); }
}

.sylv-feed-meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ── Article Cards ── */
.gh-card {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
    transition: padding-left 0.15s ease;
    display: block;
}

.gh-card:hover { padding-left: 6px; }
.gh-card:last-child { border-bottom: none; }

.gh-card-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

/* Text block — fills remaining space */
.gh-card-body {
    flex: 1;
    min-width: 0;
}

.gh-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

/* Tag badge */
.sylv-tag-badge {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.sylv-tag-badge.tag-ai       { color: var(--tag-ai);       background: rgba(167, 139, 250, 0.12); }
.sylv-tag-badge.tag-dev      { color: var(--tag-dev);      background: rgba(56,  189, 248, 0.12); }
.sylv-tag-badge.tag-infra    { color: var(--tag-infra);    background: rgba(251, 146,  60, 0.12); }
.sylv-tag-badge.tag-security { color: var(--tag-security); background: rgba(248, 113, 113, 0.12); }
.sylv-tag-badge.tag-hardware { color: var(--tag-hardware); background: rgba(251, 191,  36, 0.12); }
.sylv-tag-badge.tag-business { color: var(--tag-business); background: rgba(52,  211, 153, 0.12); }
.sylv-tag-badge.tag-canopy   { color: var(--accent);       background: var(--accent-dim); }
.sylv-tag-badge.tag-folium   { color: var(--folium);       background: var(--folium-dim); }
.sylv-tag-badge.tag-default  { color: var(--text-muted);   background: rgba(171, 171, 171, 0.10); }

.sylv-card-date {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: var(--text-muted);
}

/* Thumbnail — left side of card, vertically centered */
.sylv-card-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    opacity: 0.85;
}

.gh-card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text);
    margin-bottom: 7px;
    letter-spacing: -0.01em;
    transition: color 0.15s;
}

.gh-card:hover .gh-card-title { color: var(--accent); }

.gh-card-content p,
.gh-card-excerpt {
    font-size: 0.86rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

.gh-card-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.sylv-reading-time {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
}

.sylv-read-link {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--accent);
    opacity: 0.75;
    transition: opacity 0.15s;
}

.sylv-read-link:hover { opacity: 1; }

/* ── Right Sidebar ── */
.sylv-sidebar-right {
    grid-area: sidebar-right;
    padding: 1.5rem 1.25rem;
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height));
    overflow-y: auto;
}

.sylv-widget { margin-bottom: 2rem; }

.sylv-widget-title {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

/* Trending list */
.sylv-trending-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.15s;
}

.sylv-trending-item:last-child { border-bottom: none; }

.sylv-trending-num {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: var(--text-muted);
    padding-top: 2px;
    min-width: 14px;
    flex-shrink: 0;
}

.sylv-trending-text {
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.4;
    transition: color 0.15s;
}

.sylv-trending-item:hover .sylv-trending-text { color: var(--text); }

/* Cross-section teaser */
.sylv-teaser {
    border-radius: 8px;
    padding: 1rem;
}

.sylv-teaser.canopy {
    background: linear-gradient(135deg, rgba(156, 201, 182, 0.08), rgba(156, 201, 182, 0.03));
    border: 1px solid rgba(156, 201, 182, 0.18);
}

.sylv-teaser.folium {
    background: linear-gradient(135deg, rgba(171, 171, 171, 0.08), rgba(171, 171, 171, 0.03));
    border: 1px solid rgba(171, 171, 171, 0.18);
}

.sylv-teaser-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: block;
}

.sylv-teaser.canopy .sylv-teaser-label { color: var(--accent); }
.sylv-teaser.folium .sylv-teaser-label { color: var(--folium); }

.sylv-teaser-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
    line-height: 1.3;
    display: block;
    text-decoration: none;
}

.sylv-teaser-desc {
    font-size: 0.76rem;
    font-weight: 300;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.5;
}

.sylv-teaser-link {
    font-size: 0.76rem;
    font-weight: 500;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.15s;
}

.sylv-teaser-link:hover { opacity: 1; }
.sylv-teaser.canopy .sylv-teaser-link { color: var(--accent); }
.sylv-teaser.folium .sylv-teaser-link { color: var(--folium); }

/* Pagination */
.gh-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}

.gh-pagination a {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--text-muted);
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.15s;
}

.gh-pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ================================================================
   POST / PAGE LAYOUT
   ================================================================ */

.sylv-post-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    grid-template-areas: "post-content post-aside";
    max-width: var(--container);
    margin: 0 auto;
    min-height: calc(100vh - var(--nav-height));
}

.sylv-post-content {
    grid-area: post-content;
    padding: 2.5rem 3rem 3rem;
    border-right: 1px solid var(--border);
    min-width: 0;
}

.sylv-post-aside {
    grid-area: post-aside;
    padding: 1.5rem 1.25rem;
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height));
    overflow-y: auto;
}

/* Post header */
.sylv-post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.sylv-post-date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
}

.sylv-post-reading-time {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
}

.gh-title {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text);
    letter-spacing: -0.03em;
    margin-bottom: 0;
}

.gh-excerpt {
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-top: 1rem;
}

/* Feature image */
.gh-feature-image {
    margin: 2rem 0;
}

.gh-feature-image img {
    width: 100%;
    border-radius: 8px;
    display: block;
}

.gh-feature-image figcaption {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
    font-style: italic;
}

/* ── gh-canvas — Ghost content grid ── */
.gh-canvas {
    --gap: 4vw;
    --main: min(var(--content-width, 720px), 100% - var(--gap) * 2);
    --wide: minmax(0, calc((900px - var(--content-width, 720px)) / 2));
    --full: minmax(var(--gap), 1fr);

    display: grid;
    grid-template-columns:
        [full-start] var(--full)
        [wide-start] var(--wide)
        [main-start] var(--main) [main-end]
        var(--wide) [wide-end]
        var(--full) [full-end];
}

.gh-canvas > * {
    grid-column: main-start / main-end;
}

.kg-width-wide,
.kg-content-wide > div {
    grid-column: wide-start / wide-end;
}

.kg-width-full {
    grid-column: full-start / full-end;
}

.kg-width-full img { width: 100%; }

/* ── gh-content — article typography ── */
.gh-content {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.78;
}

.gh-content > * + * { margin-top: 1.5rem; }

.gh-content h1,
.gh-content h2,
.gh-content h3,
.gh-content h4 {
    font-weight: 600;
    color: var(--text);
    margin-top: 2.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.gh-content h2 { font-size: 1.4rem; }
.gh-content h3 { font-size: 1.1rem; }
.gh-content h4 { font-size: 0.95rem; }

.gh-content p { margin-bottom: 1.25rem; }

.gh-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.gh-content a:hover { color: var(--accent-mid); }

.gh-content ul { list-style: disc; padding-left: 1.5rem; }
.gh-content ol { list-style: decimal; padding-left: 1.5rem; }
.gh-content li { margin-bottom: 6px; }

.gh-content blockquote {
    border-left: 3px solid var(--accent-dark);
    padding-left: 1.25rem;
    margin: 2rem 0;
    color: var(--text-muted);
    font-style: italic;
    font-size: 1.05em;
}

.gh-content code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--surface2);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--tag-dev);
}

.gh-content pre {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 2rem 0;
}

.gh-content pre code {
    background: none;
    padding: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.gh-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0;
}

.gh-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.gh-content th {
    padding: 8px 12px;
    text-align: left;
    font-size: 0.72em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.gh-content td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}

/* AI Summary callout */
.sylv-ai-summary {
    border-radius: 8px;
    padding: 1.1rem 1.4rem;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent-dark);
    background: rgba(156, 201, 182, 0.05);
}

.sylv-ai-summary.folium {
    border-left-color: var(--folium);
    background: rgba(171, 171, 171, 0.05);
}

.sylv-ai-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
    display: block;
}

.sylv-ai-summary.folium .sylv-ai-label { color: var(--folium); }

.sylv-ai-text {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* Verdict badges */
.sylv-verdict {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 2rem 0;
}

.sylv-verdict.recommend {
    background: rgba(156, 201, 182, 0.08);
    border: 1px solid rgba(156, 201, 182, 0.25);
    color: var(--accent);
}

.sylv-verdict.neutral {
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.25);
    color: var(--tag-hardware);
}

.sylv-verdict.skip {
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.25);
    color: var(--tag-security);
}

.sylv-verdict-icon { font-size: 1.25rem; flex-shrink: 0; }

.sylv-verdict-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.65;
    display: block;
}

.sylv-verdict-text {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Affiliate CTA */
.sylv-affiliate-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 1.5rem 0;
    padding: 10px 22px;
    background: var(--accent);
    color: #1a1a1a;
    border-radius: 7px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s;
    letter-spacing: -0.01em;
}

.sylv-affiliate-btn:hover { opacity: 0.88; transform: translateY(-1px); }

/* Post footer: authors, comments, next/prev */
.gh-post-authors {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.gh-post-authors a {
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
}

.gh-post-comments { margin-top: 2rem; }

/* Next/prev navigation */
.gh-readmore {
    border-top: 1px solid var(--border);
    padding: 1.25rem 0;
    max-width: var(--container);
    margin: 0 auto;
}

.gh-readmore-inner {
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    gap: 2rem;
}

.gh-readmore-next,
.gh-readmore-prev { flex: 1; }

.gh-readmore-next a,
.gh-readmore-prev a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 0;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.15s;
}

.gh-readmore-prev a { justify-content: flex-end; }

.gh-readmore-next a:hover,
.gh-readmore-prev a:hover { color: var(--accent); }

.gh-readmore-next h4,
.gh-readmore-prev h4 {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.35;
    margin: 0;
}

/* Post sidebar */
.sylv-post-aside .sylv-related-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.15s;
}

.sylv-post-aside .sylv-related-item:last-child { border-bottom: none; }

.sylv-related-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.4;
    transition: color 0.15s;
}

.sylv-post-aside .sylv-related-item:hover .sylv-related-title { color: var(--text); }

.sylv-related-date {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-muted);
}

.sylv-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 1rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.sylv-back-link:hover { color: var(--accent); }

/* ================================================================
   TAG + AUTHOR PAGE HEADERS
   ================================================================ */

.gh-page {
    max-width: var(--container);
    margin: 0 auto;
    padding: 2rem;
}

.gh-page-head {
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.gh-page-head h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.gh-page-head p {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 300;
    max-width: 600px;
}

.gh-page-image {
    margin-top: 1.5rem;
    border-radius: 8px;
    max-height: 300px;
    object-fit: cover;
    width: 100%;
}

/* Author */
.gh-author-image {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 2px solid var(--border);
}

.gh-author-meta { margin-top: 0.75rem; }

.gh-author-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.gh-author-links a {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 5px;
    transition: all 0.15s;
}

.gh-author-links a:hover { border-color: var(--accent); }

/* Post grid for tag/author pages */
.gh-postfeed { padding: 0; }

/* ================================================================
   ERROR PAGE
   ================================================================ */

.gh-error {
    min-height: calc(100vh - var(--nav-height) - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.gh-error-content { max-width: 480px; }

.gh-error-code {
    font-size: 6rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -0.05em;
    opacity: 0.85;
    margin-bottom: 1rem;
}

.gh-error-description {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.gh-error-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s;
}

.gh-error-link a:hover { border-color: var(--accent); color: var(--accent); }

.gh-error-stack {
    margin-top: 2rem;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
}

.gh-error-stack h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.gh-error-stack-list { list-style: none; }

.gh-error-stack-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.gh-error-stack-list li:last-child { border-bottom: none; }

/* ================================================================
   SECTION NAV TABS (Canopy / Folium logos in header)
   ================================================================ */

.gh-head-nav {
    display: flex;
    align-items: center;
    justify-content: center; /* keep centered overall */
    flex: 1;                 /* fill center space between logo and actions */
    gap: 8px;                /* small gap — Canopy left of divider, Folium right */
}

.sylv-nav-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.15s;
    white-space: nowrap;
    height: 36px;
}

/* Logo image inside nav tab */
.sylv-nav-logo-img {
    height: 28px;
    width: auto;
    max-width: 100px;
    display: block;
    object-fit: contain;
    opacity: 0.75;
    transition: opacity 0.15s;
}

.sylv-nav-tab:hover .sylv-nav-logo-img,
.sylv-nav-tab.active .sylv-nav-logo-img {
    opacity: 1;
}

/* Text fallback (when no logo image set) */
.sylv-nav-tab-text {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.sylv-nav-tab-text.canopy { color: var(--accent); }
.sylv-nav-tab-text.folium { color: var(--folium); }

/* Canopy tab */
.sylv-nav-canopy {
    background: transparent;
    border-color: transparent;
}

.sylv-nav-canopy:hover,
.sylv-nav-canopy.active {
    background: var(--accent-dim);
    border-color: var(--border);
}

/* Folium tab */
.sylv-nav-folium {
    background: transparent;
    border-color: transparent;
}

.sylv-nav-folium:hover,
.sylv-nav-folium.active {
    background: rgba(171, 171, 171, 0.1);
    border-color: rgba(171, 171, 171, 0.2);
}

/* About link */
.sylv-nav-about {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 5px;
    transition: all 0.15s;
    white-space: nowrap;
}

.sylv-nav-about:hover {
    color: var(--text);
    background: var(--surface);
}

/* ================================================================
   SIDEBAR SECTION TOGGLING
   Body class sylv-section-canopy / sylv-section-folium
   set by JS in default.hbs
   ================================================================ */

/* Default: show both (before JS runs, show canopy) */
.sylv-topics-canopy { display: block; }
.sylv-topics-folium { display: none; }

/* On Canopy section: show Canopy topics only */
.sylv-section-canopy .sylv-topics-canopy { display: block; }
.sylv-section-canopy .sylv-topics-folium { display: none; }

/* On Folium section: show Folium topics only */
.sylv-section-folium .sylv-topics-canopy { display: none; }
.sylv-section-folium .sylv-topics-folium { display: block; }

/* On landing page (home-template): show both */
.home-template .sylv-topics-canopy,
.home-template .sylv-topics-folium { display: block; }

/* Active tab accent matches section */
.sylv-section-canopy .sylv-category-item.active {
    background: var(--accent-dim);
    color: var(--accent);
}

.sylv-section-folium .sylv-category-item.active {
    background: rgba(171, 171, 171, 0.12);
    color: var(--folium);
}

/* ================================================================
   HOMEPAGE — Two-column feed (index.hbs)
   Left: Canopy news · Right: Folium reviews
   ================================================================ */

.sylv-home {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "canopy divider folium";
    max-width: var(--container);
    margin: 0 auto;
    min-height: calc(100vh - var(--nav-height));
}

.sylv-home-col {
    padding: 1.5rem 2rem;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sylv-home-divider {
    grid-area: divider;
    width: 1px;
    background: var(--border);
    align-self: stretch;
}

/* Column header: logo + description */
.sylv-home-col-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.sylv-home-col-logo {
    height: 32px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    display: block;
}

.sylv-home-col-title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    display: block;
}

.sylv-home-col-title.canopy { color: var(--accent); }
.sylv-home-col-title.folium { color: var(--folium); }

.sylv-home-col-desc {
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.5;
    display: block;
}

/* Feed list — uses gh-card partial */
.sylv-home-feed-list {
    flex: 1;
}

/* View all link at bottom of column */
.sylv-home-view-all {
    display: inline-flex;
    align-items: center;
    margin-top: 1rem;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid;
    transition: all 0.15s;
    align-self: flex-end;
}

.sylv-home-view-all.canopy {
    color: var(--accent);
    border-color: var(--border-strong);
    background: var(--accent-dim);
}

.sylv-home-view-all.canopy:hover {
    background: rgba(156, 201, 182, 0.2);
    border-color: var(--accent);
}

.sylv-home-view-all.folium {
    color: var(--folium);
    border-color: rgba(171, 171, 171, 0.25);
    background: rgba(171, 171, 171, 0.08);
    align-self: flex-start;
}

.sylv-home-view-all.folium:hover {
    background: rgba(171, 171, 171, 0.15);
    border-color: var(--folium);
}

/* On homepage, Canopy cards hover with canopy accent */
.sylv-home-col-canopy .gh-card:hover .gh-card-title { color: var(--accent); }

/* On homepage, Folium column — use folium (neutral) accent consistently */
.sylv-home-col-folium .gh-card:hover .gh-card-title { color: var(--folium); }
.sylv-home-col-folium .sylv-read-link { color: var(--folium); }
.sylv-home-col-folium .sylv-tag-badge.tag-folium { color: var(--folium); background: var(--folium-dim); }

/* Homepage viewport containment — no page scrollbar */
.home-template .gh-main {
    overflow: hidden;
    height: calc(100vh - var(--nav-height));
}

.home-template .sylv-home {
    height: 100%;
    overflow: hidden;
}

.home-template .sylv-home-col {
    height: 100%;
    overflow-y: auto;
}

.home-template .sylv-home-divider {
    height: 100%;
}

/* Homepage responsive */
@media (max-width: 900px) {
    .sylv-home {
        grid-template-columns: 1fr;
        grid-template-areas:
            "canopy"
            "divider"
            "folium";
    }
    .sylv-home-divider {
        width: 100%;
        height: 1px;
    }
    .sylv-home-col { padding: 1.25rem 1rem; }
}

/* ================================================================
   MOBILE DRAWER
   ================================================================ */

.sylv-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 200;
}

.sylv-drawer-overlay.open { display: block; }

.sylv-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg);
    border-right: 1px solid var(--border);
    z-index: 300;
    padding: 1.5rem 1rem;
    padding-top: 68px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    overflow-y: auto;
}

.sylv-drawer.open { transform: translateX(0); }

.sylv-drawer-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1rem;
    transition: all 0.15s;
}

.sylv-drawer-close:hover { border-color: var(--accent); color: var(--text); }

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* Tablet: hide right sidebar */
@media (max-width: 1100px) {
    .sylv-feed-layout {
        grid-template-columns: 200px 1fr;
        grid-template-areas: "sidebar-left feed";
    }

    .sylv-sidebar-right { display: none; }

    .sylv-post-layout {
        grid-template-columns: 1fr;
        grid-template-areas: "post-content";
    }

    .sylv-post-aside { display: none; }
}

/* Mobile: single column */
@media (max-width: 767px) {
    .gh-head-inner { padding: 0 1rem; }
    .gh-head-menu  { display: none; }
    .gh-head-actions .gh-button { display: none; }
    .nav-clock { display: none; }

    .gh-burger {
        display: flex;
        cursor: pointer;
    }

    .sylv-feed-layout {
        grid-template-columns: 1fr;
        grid-template-areas: "feed";
    }

    .sylv-sidebar-left { display: none; }

    .sylv-feed { padding: 1.25rem 1rem; border-right: none; }

    .sylv-feed-header { flex-direction: column; align-items: flex-start; }

    .sylv-post-content { padding: 1.5rem 1rem; }

    .gh-title { font-size: 1.5rem; }

    .gh-readmore-inner { flex-direction: column; padding: 0 1rem; }

    .gh-page { padding: 1.5rem 1rem; }
}
