/* ==========================================================================
   OffLearn — shared base styles for content pages
   Header/footer styles live in components/header.html and components/footer.html
   and are inlined into each page by build.py.
   ========================================================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #2c5530;
    color: #fff;
    padding: 0.75rem 1.25rem;
    z-index: 2000;
    border-radius: 0 0 6px 0;
}

.skip-link:focus {
    left: 0;
}

/* --------------------------------------------------------------------------
   Page hero
   -------------------------------------------------------------------------- */

.page-hero {
    background: linear-gradient(135deg, #f4f9f4 0%, #eaf3ea 100%);
    border-bottom: 1px solid #dbe8db;
    padding: 3rem 0 2.5rem;
}

.page-hero h1 {
    font-size: 2.4rem;
    line-height: 1.25;
    color: #2c5530;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
}

.page-hero .lede {
    font-size: 1.15rem;
    color: #4a5a4a;
    max-width: 68ch;
}

.page-hero .meta {
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: #5d6b5d;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

/* Breadcrumbs */
.breadcrumb {
    padding: 1rem 0 0;
    font-size: 0.88rem;
    color: #6b7a6b;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.breadcrumb li::after {
    content: "›";
    margin-left: 0.4rem;
    color: #a8b5a8;
}

.breadcrumb li:last-child::after {
    content: "";
}

.breadcrumb a {
    color: #2c5530;
    text-decoration: none;
}

.breadcrumb a:hover,
.breadcrumb a:focus {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Article / prose content
   -------------------------------------------------------------------------- */

.content {
    padding: 3rem 0 4rem;
}

.prose {
    max-width: 72ch;
}

.prose.wide {
    max-width: none;
}

.prose h2 {
    font-size: 1.7rem;
    color: #2c5530;
    margin: 2.75rem 0 1rem;
    line-height: 1.3;
}

.prose h3 {
    font-size: 1.25rem;
    color: #1e3d21;
    margin: 2rem 0 0.75rem;
}

.prose h4 {
    font-size: 1.05rem;
    color: #1e3d21;
    margin: 1.5rem 0 0.5rem;
}

.prose > *:first-child {
    margin-top: 0;
}

.prose p,
.prose ul,
.prose ol,
.prose table,
.prose blockquote {
    margin-bottom: 1.25rem;
}

.prose ul,
.prose ol {
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose a {
    color: #2c5530;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.prose a:hover,
.prose a:focus {
    color: #1e3d21;
}

.prose strong {
    color: #1e3d21;
}

.prose blockquote {
    border-left: 4px solid #2c5530;
    background: #f6faf6;
    padding: 1rem 1.25rem;
    color: #44554a;
}

.prose code {
    background: #f0f4f0;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.92em;
}

.prose hr {
    border: 0;
    border-top: 1px solid #e2eae2;
    margin: 2.5rem 0;
}

/* Callout box */
.callout {
    background: #f6faf6;
    border: 1px solid #d6e6d6;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
}

.callout h3,
.callout h4 {
    margin-top: 0;
}

.callout.warn {
    background: #fffaf0;
    border-color: #f0e0bc;
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.table-wrap {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    -webkit-overflow-scrolling: touch;
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.95rem;
    min-width: 480px;
}

th,
td {
    text-align: left;
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid #e4ebe4;
    vertical-align: top;
}

thead th {
    background: #f2f7f2;
    color: #1e3d21;
    font-weight: 600;
    border-bottom: 2px solid #d6e6d6;
    white-space: nowrap;
}

tbody tr:hover {
    background: #fafcfa;
}

caption {
    caption-side: bottom;
    padding-top: 0.75rem;
    font-size: 0.85rem;
    color: #6b7a6b;
    text-align: left;
}

/* --------------------------------------------------------------------------
   Cards & grids
   -------------------------------------------------------------------------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    margin: 1.75rem 0;
}

.card {
    border: 1px solid #e2eae2;
    border-radius: 10px;
    padding: 1.25rem;
    background: #fff;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
    border-color: #c3d9c3;
    box-shadow: 0 4px 14px rgba(44, 85, 48, 0.08);
}

.card h3 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
}

.card h3 a {
    color: #2c5530;
    text-decoration: none;
}

.card h3 a:hover,
.card h3 a:focus {
    text-decoration: underline;
}

.card p {
    font-size: 0.94rem;
    color: #55605a;
    margin-bottom: 0.5rem;
}

.card .card-meta {
    font-size: 0.82rem;
    color: #7a877a;
}

/* Resource entry list */
.resource-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.resource-list > li {
    border: 1px solid #e2eae2;
    border-radius: 10px;
    padding: 1.25rem 1.4rem;
    margin-bottom: 1rem;
}

.resource-list h3 {
    font-size: 1.12rem;
    margin: 0 0 0.4rem;
}

.resource-list h3 a {
    color: #2c5530;
    text-decoration: none;
}

.resource-list h3 a:hover,
.resource-list h3 a:focus {
    text-decoration: underline;
}

.resource-list p {
    margin: 0 0 0.6rem;
    color: #4c574f;
    font-size: 0.96rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.75rem;
}

.tag {
    background: #eef4ee;
    color: #2c5530;
    border-radius: 12px;
    padding: 0.2rem 0.6rem;
    white-space: nowrap;
}

.tag.alt {
    background: #f1f1f1;
    color: #555;
}

/* Jump/anchor navigation */
.jumpnav {
    background: #f7faf7;
    border: 1px solid #e2eae2;
    border-radius: 10px;
    padding: 1.1rem 1.4rem;
    margin: 2rem 0;
}

.jumpnav h2 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #5d6b5d;
    margin: 0 0 0.75rem;
}

.jumpnav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

.jumpnav a {
    color: #2c5530;
    font-size: 0.94rem;
}

/* Buttons */
.btn {
    display: inline-block;
    background: #2c5530;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.btn:hover,
.btn:focus {
    background: #1e3d21;
    color: #fff;
}

.btn.secondary {
    background: #fff;
    color: #2c5530;
    border: 2px solid #2c5530;
}

.btn.secondary:hover,
.btn.secondary:focus {
    background: #eef4ee;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin: 1.75rem 0;
}

/* Updated / source note */
.source-note {
    font-size: 0.85rem;
    color: #6b7a6b;
    border-top: 1px solid #e6ece6;
    padding-top: 1rem;
    margin-top: 2.5rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .page-hero {
        padding: 2rem 0 1.75rem;
    }

    .page-hero h1 {
        font-size: 1.85rem;
    }

    .page-hero .lede {
        font-size: 1.05rem;
    }

    .content {
        padding: 2rem 0 3rem;
    }

    .prose h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .page-hero h1 {
        font-size: 1.55rem;
    }

    .resource-list > li {
        padding: 1rem;
    }
}
