/* Learn hub + article pages (linked per-page by Learn.razor, ArticleLayout.razor,
   and the Home teaser section). Global tokens come from 01-foundation.css; the
   var() fallbacks cover both the design-system names (DESIGN.md) and the
   scaffold names so the cluster renders either way. */

/* ---------- hub + teaser cards ---------- */

.learn-intro {
    max-width: 800px;
    margin: 0 0 28px;
    font-size: 1.05rem;
    line-height: 1.7;
}

.blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.blog-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease, box-shadow .15s ease;
}

.blog-card:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(20, 20, 20, .12), 0 10px 30px rgba(20, 20, 20, .10);
}

@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .blog-card:hover {
        transition: none;
        transform: none;
    }
}

.blog-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.learn-chip {
    align-self: flex-start;
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--green-100, var(--gold-100, #E8F2DB));
    color: var(--green-800, var(--gold-700, #2F5417));
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.blog-card-title {
    font-size: 1.1rem;
}

.blog-card-blurb {
    font-size: 14.5px;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 13px;
    color: var(--stone-600, var(--steel-600, #626861));
}

.blog-listing-note {
    margin-top: 28px;
}

/* ---------- article shell ---------- */

.article-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.article-breadcrumbs a {
    color: var(--leaf-300, var(--gold-400, #A6D06B));
}

.article-breadcrumbs span {
    color: var(--stone-500, var(--silver-500, #8C928A));
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    color: var(--stone-200, var(--silver-100, #E3E6E0));
    font-size: 14.5px;
}

.article-container {
    max-width: 800px;
}

/* ---------- article body typography ---------- */

.article-body p {
    margin-bottom: 16px;
    line-height: 1.7;
}

.article-body h2 {
    display: inline-block;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--bark-600, var(--brown-700, #6B4423));
    margin: 26px 0 14px;
}

.article-body h3 {
    margin: 20px 0 10px;
}

.article-body ul,
.article-body ol {
    margin: 0 0 16px 22px;
    color: var(--stone-700, var(--steel-700, #3B403A));
}

.article-body li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 18px;
    font-size: 15px;
}

.article-body th,
.article-body td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--stone-200, var(--silver-100, #E3E6E0));
    vertical-align: top;
}

.article-body th {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.85rem;
}

.article-table-wrap {
    overflow-x: auto;
}

.article-answer {
    background: var(--green-100, var(--gold-100, #E8F2DB));
    border-left: 4px solid var(--leaf-500, var(--gold-500, #74A436));
    border-radius: var(--radius-sm, 6px);
    padding: 16px 18px;
    line-height: 1.7;
}

.article-callout {
    background: var(--earth-100, var(--off-white, #F3EEE6));
    border-left: 4px solid var(--bark-600, var(--brown-700, #6B4423));
    border-radius: var(--radius-sm, 6px);
    padding: 14px 18px;
    margin: 0 0 16px;
    line-height: 1.6;
}

.article-warning {
    background: var(--warning-bg, #FEF0C7);
    border-left: 4px solid var(--danger, #B42318);
    border-radius: var(--radius-sm, 6px);
    padding: 14px 18px;
    margin: 0 0 16px;
    line-height: 1.6;
    color: var(--ink-900, var(--charcoal-900, #141414));
}

.article-formula {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--ink-900, var(--charcoal-900, #141414));
    background: var(--off-white, #F6F7F3);
    border: 1px solid var(--stone-200, var(--silver-100, #E3E6E0));
    border-radius: var(--radius-sm, 6px);
    padding: 12px 16px;
    text-align: center;
}

/* ---------- prev/next navigation ---------- */

.article-next {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.article-next-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.article-next-card:hover {
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(20, 20, 20, .12);
}

.article-next-forward {
    text-align: right;
    align-items: flex-end;
}

.article-next-label {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--green-800, var(--gold-700, #2F5417));
}

.article-next-title {
    font-weight: 600;
    color: var(--ink-900, var(--charcoal-900, #141414));
}

.article-all-link {
    margin-top: 18px;
}
