/* Atlas — Product Homepage Styles (Task 72 Polish) */
.atlas-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.atlas-page {
    box-sizing: border-box;
    max-width: 1120px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4.5rem;
    color: #1c1917;
    overflow-x: clip;
}

.atlas-page *,
.atlas-page *::before,
.atlas-page *::after {
    box-sizing: border-box;
}

.atlas-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
    gap: 1.5rem 2.25rem;
    align-items: end;
    padding-bottom: 2.25rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid #e5e0d6;
}

.atlas-hero__content {
    min-width: 0;
}

.atlas-hero h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(2.15rem, 3.6vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: #1c1917;
    text-align: left;
}

.atlas-lead {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #4a453e;
    max-width: 58ch;
}

.atlas-search-form {
    display: flex;
    gap: 0.55rem;
    align-items: stretch;
}

.atlas-search-input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 46px;
    padding: 0.65rem 0.95rem;
    font-size: 0.95rem;
    border: 1px solid #cfc9bd;
    border-radius: 10px;
    background: #fff;
    color: #1c1917;
}

.atlas-search-input:focus-visible {
    outline: 2px solid #126b5b;
    outline-offset: 2px;
    border-color: #126b5b;
}

.atlas-search-btn {
    min-height: 46px;
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: 10px;
    background: #126b5b;
    color: #fff;
    font-size: 0.94rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.atlas-search-btn:hover,
.atlas-search-btn:focus-visible {
    background: #0e5649;
    outline: 2px solid #126b5b;
    outline-offset: 2px;
}

.atlas-block-header {
    margin-bottom: 1.25rem;
}

.atlas-block-header--row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
}

.atlas-block-header h2 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.35rem, 2.2vw, 1.7rem);
    line-height: 1.22;
    color: #1c1917;
}

.atlas-block-header p {
    margin: 0;
    font-size: 0.96rem;
    color: #57524a;
}

.atlas-reset-link {
    font-size: 0.92rem;
    font-weight: 600;
    color: #126b5b;
    text-decoration: none;
}

.atlas-reset-link:hover,
.atlas-reset-link:focus-visible {
    text-decoration: underline;
    outline: 2px solid #126b5b;
    outline-offset: 3px;
    border-radius: 4px;
}

/* Section 1: Topic-Oriented Panels (Task 70) */
.atlas-topics {
    margin-bottom: 3rem;
}

.atlas-topics-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.atlas-topic-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 1.25rem 2rem;
    align-items: start;
    padding: 1.5rem 1.65rem;
    background: #fff;
    border: 1px solid #e2ddd3;
    border-radius: 16px;
    min-width: 0;
    overflow-wrap: break-word;
}

.atlas-topic-panel__intro {
    min-width: 0;
}

.atlas-topic-panel__meta {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.5rem;
}

.atlas-topic-panel__count {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b6359;
}

.atlas-topic-panel__title a {
    color: inherit;
    text-decoration: none;
}

.atlas-topic-panel__title a:hover,
.atlas-topic-panel__title a:focus-visible {
    color: #126b5b;
    text-decoration: underline;
    outline: 2px solid #126b5b;
    outline-offset: 2px;
    border-radius: 4px;
}

.atlas-topic-panel__cta {
    display: inline-flex;
    align-items: center;
    margin-top: 0.9rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #126b5b;
    text-decoration: none;
}

.atlas-topic-panel__cta:hover,
.atlas-topic-panel__cta:focus-visible {
    text-decoration: underline;
    outline: 2px solid #126b5b;
    outline-offset: 3px;
    border-radius: 4px;
}

/* Dedicated Topic Hub View (?temat=...) */
.atlas-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.atlas-breadcrumbs a {
    color: #126b5b;
    text-decoration: none;
}

.atlas-breadcrumbs a:hover,
.atlas-breadcrumbs a:focus-visible {
    text-decoration: underline;
    outline: 2px solid #126b5b;
    outline-offset: 2px;
    border-radius: 4px;
}

.atlas-hub-hero {
    padding-bottom: 2rem;
    margin-bottom: 2.25rem;
    border-bottom: 1px solid #e5e0d6;
}

.atlas-hub-hero__question {
    margin: 0.75rem 0 0.45rem;
    font-size: 0.98rem;
    font-weight: 600;
    color: #126b5b;
}

.atlas-hub-hero h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.85rem, 3.2vw, 2.55rem);
    line-height: 1.15;
    color: #1c1917;
    text-align: left;
}

.atlas-hub-resources {
    margin-bottom: 2.75rem;
}

.atlas-hub-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.atlas-hub-related {
    padding: 1.5rem;
    background: #f7f4ee;
    border: 1px solid #e6e0d4;
    border-radius: 16px;
}

.atlas-hub-related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.atlas-related-topic-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 1.15rem 1.25rem;
    background: #fff;
    border: 1px solid #e3ddd2;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.atlas-related-topic-card .atlas-card__footer {
    width: 100%;
}

.atlas-related-topic-card:hover,
.atlas-related-topic-card:focus-visible {
    border-color: #126b5b;
    outline: 2px solid #126b5b;
    outline-offset: 2px;
}

.atlas-related-topic-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1c1917;
}

.atlas-related-topic-card__q {
    font-size: 0.88rem;
    color: #57524a;
}

@media (max-width: 640px) {
    .atlas-hub-grid,
    .atlas-hub-related-grid {
        grid-template-columns: 1fr;
    }
}

.atlas-topic-panel__question {
    margin: 0 0 0.4rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #126b5b;
}

.atlas-topic-panel__title {
    margin: 0 0 0.55rem;
    font-size: 1.32rem;
    line-height: 1.22;
    color: #1c1917;
}

.atlas-topic-panel__scope {
    margin: 0;
    font-size: 0.93rem;
    line-height: 1.55;
    color: #524c44;
}

.atlas-topic-resources {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.atlas-topic-resource {
    min-width: 0;
}

.atlas-topic-resource__link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    padding: 0.68rem 0.9rem;
    background: #faf8f5;
    border: 1px solid #e8e3d9;
    border-radius: 10px;
    min-width: 0;
    text-decoration: none;
    color: #1c1917;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.atlas-topic-resource__link:hover,
.atlas-topic-resource__link:focus-visible {
    border-color: #126b5b;
    background: #f1f7f5;
    outline: 2px solid #126b5b;
    outline-offset: 2px;
}

.atlas-topic-resource__title {
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.3;
}

.atlas-topic-resource__arrow {
    color: #126b5b;
    font-weight: 700;
}

/* Section 1 legacy placeholder kept removed */
.atlas-tasks {
    margin-bottom: 3rem;
}

.atlas-tasks-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem;
}

.atlas-task-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1.45rem 1.5rem;
    background: #fff;
    border: 1px solid #e2ddd3;
    border-left: 4px solid #126b5b;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.atlas-task-card--concepts { border-left-color: #126b5b; }
.atlas-task-card--tools { border-left-color: #b47412; }
.atlas-task-card--visualizations { border-left-color: #3b6380; }
.atlas-task-card--metaphors { border-left-color: #7c4d6b; }

.atlas-task-card:hover,
.atlas-task-card:focus-visible {
    box-shadow: 0 8px 24px rgba(28, 25, 23, 0.07);
    transform: translateY(-1px);
    outline: 2px solid #126b5b;
    outline-offset: 2px;
}

.atlas-task-card.is-active {
    background: #f4f9f7;
    border-color: #126b5b;
}

.atlas-task-card__eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5c554c;
}

.atlas-task-card__title {
    font-size: 1.24rem;
    font-weight: 700;
    line-height: 1.25;
    color: #1c1917;
}

.atlas-task-card__desc {
    font-size: 0.94rem;
    line-height: 1.55;
    color: #4f4840;
}

.atlas-task-card__cta {
    margin-top: auto;
    padding-top: 0.45rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #126b5b;
}

/* Section 2: 4 Verified Starter Resources */
.atlas-starters {
    margin-bottom: 3.25rem;
    padding: 1.75rem;
    background: #f7f4ee;
    border: 1px solid #e6e0d4;
    border-radius: 18px;
}

.atlas-starters-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.atlas-starter-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1.25rem 1.35rem;
    background: #fff;
    border: 1px solid #e3ddd2;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.atlas-starter-card:hover,
.atlas-starter-card:focus-visible {
    border-color: #126b5b;
    box-shadow: 0 4px 16px rgba(28, 25, 23, 0.06);
    outline: 2px solid #126b5b;
    outline-offset: 2px;
}

.atlas-starter-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1c1917;
}

.atlas-starter-card__desc {
    font-size: 0.91rem;
    line-height: 1.5;
    color: #4f4840;
}

/* Section 3: Filters & Progressive Catalog */
.atlas-filters {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1rem 1.15rem;
    background: #f8f6f2;
    border: 1px solid #e5e0d5;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.atlas-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.atlas-filter-label {
    font-size: 0.84rem;
    font-weight: 700;
    color: #57524a;
    margin-right: 0.25rem;
}

.atlas-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.8rem;
    border-radius: 999px;
    border: 1px solid #d6d0c4;
    background: #fff;
    color: #292524;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
}

.atlas-pill:hover,
.atlas-pill:focus-visible {
    border-color: #126b5b;
    background: #f0f7f5;
    outline: 2px solid #126b5b;
    outline-offset: 2px;
}

.atlas-pill--active {
    background: #126b5b;
    border-color: #126b5b;
    color: #fff;
}

.atlas-section {
    margin-bottom: 2.75rem;
}

.atlas-section__header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem 1rem;
    padding-bottom: 0.65rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid #e7e2d8;
}

.atlas-section__header h3 {
    margin: 0 0 0.2rem;
    font-size: 1.22rem;
    color: #1c1917;
}

.atlas-section__lead {
    margin: 0;
    font-size: 0.9rem;
    color: #5c554c;
}

.atlas-section__count {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b6359;
    white-space: nowrap;
}

.atlas-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.95rem;
}

.atlas-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.1rem 1.15rem;
    background: #fff;
    border: 1px solid #e3ddd2;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
    overflow-wrap: break-word;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.atlas-card:hover,
.atlas-card:focus-visible {
    border-color: #126b5b;
    box-shadow: 0 4px 14px rgba(28, 25, 23, 0.05);
    outline: 2px solid #126b5b;
    outline-offset: 2px;
}

.atlas-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.atlas-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
}

.atlas-badge--concepts { background: #eaf4f1; color: #126b5b; }
.atlas-badge--processes { background: #eef1f8; color: #364e7a; }
.atlas-badge--articles { background: #f3f1ec; color: #433e37; }
.atlas-badge--tools { background: #fbf2e3; color: #9a600a; }
.atlas-badge--visualizations { background: #ebf2f7; color: #2f5570; }
.atlas-badge--metaphors { background: #f5ecf2; color: #6e3f5d; }
.atlas-badge--method { background: #f2efe9; color: #4a453e; }
.atlas-badge--supplementary { background: #fdf3e7; color: #945208; }
.atlas-badge--contextual { background: #f1f0ec; color: #5c554c; }

/* Whole-Site Sections Directory (Task 74) */
.atlas-site-sections {
    margin-bottom: 3rem;
    padding: 1.65rem;
    background: #f7f4ee;
    border: 1px solid #e5dfd3;
    border-radius: 16px;
}

.atlas-site-groups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.atlas-site-group {
    min-width: 0;
}

.atlas-site-group__title {
    margin: 0 0 0.7rem;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5c554c;
}

.atlas-site-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.atlas-site-link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 0.9rem;
    background: #fff;
    border: 1px solid #e2ddd2;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.atlas-site-link:hover,
.atlas-site-link:focus-visible {
    border-color: #126b5b;
    background: #f4f9f7;
    outline: 2px solid #126b5b;
    outline-offset: 2px;
}

.atlas-site-link__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1c1917;
}

.atlas-site-link__arrow {
    color: #126b5b;
}

.atlas-site-link__desc {
    font-size: 0.82rem;
    line-height: 1.42;
    color: #57524a;
}

/* Hub Subsections & Supplementary Block */
.atlas-hub-subsection {
    margin-bottom: 1.85rem;
}

.atlas-hub-subsection:last-child {
    margin-bottom: 0;
}

.atlas-hub-subsection__title {
    margin: 0 0 0.85rem;
    font-size: 1.06rem;
    color: #292524;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid #eae5dc;
}

.atlas-hub-subsection__title span {
    font-weight: 600;
    font-size: 0.9rem;
    color: #6b6359;
}

.atlas-hub-supplementary {
    margin-bottom: 2.75rem;
    padding: 1.5rem;
    background: #f8f6f2;
    border: 1px solid #e6e0d4;
    border-radius: 16px;
}

@media (max-width: 900px) {
    .atlas-site-groups {
        grid-template-columns: 1fr;
    }
}

.atlas-card__title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.32;
    color: #1c1917;
}

.atlas-card__summary {
    font-size: 0.87rem;
    line-height: 1.48;
    color: #57524a;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.atlas-card__footer {
    margin-top: auto;
    padding-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.84rem;
    font-weight: 600;
    color: #126b5b;
}

.atlas-section__more {
    margin-top: 1rem;
}

.atlas-more-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1.05rem;
    border-radius: 999px;
    border: 1px solid #126b5b;
    background: #fff;
    color: #126b5b;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.atlas-more-btn:hover,
.atlas-more-btn:focus-visible {
    background: #126b5b;
    color: #fff;
    outline: 2px solid #126b5b;
    outline-offset: 2px;
}

.atlas-empty {
    padding: 2rem 1.25rem;
    text-align: center;
    background: #f8f6f2;
    border: 1px solid #e5e0d5;
    border-radius: 12px;
    color: #4f4840;
}

.atlas-note {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e7e2d8;
    font-size: 0.86rem;
    color: #6b6359;
}

@media (max-width: 900px) {
    .atlas-hero,
    .atlas-topic-panel {
        grid-template-columns: 1fr;
    }
    .atlas-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    html,
    body {
        max-width: 100%;
        overflow-x: clip;
    }
    .site-header,
    .site-header .nav-container,
    .site-header .nav-links {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    .site-header .nav-links {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
    .site-header .nav-links > a,
    .site-header .nav-dropdown,
    .site-header .nav-dropdown > a {
        min-width: 0;
        max-width: 100%;
        white-space: normal;
        overflow-wrap: break-word;
    }
    .atlas-page {
        padding: 1.5rem 1rem 3rem;
    }
    .atlas-topic-panel {
        padding: 1.15rem 1.05rem;
    }
    .atlas-tasks-grid,
    .atlas-starters-grid,
    .atlas-grid {
        grid-template-columns: 1fr;
    }
    .atlas-starters {
        padding: 1.2rem;
    }
    .atlas-search-form {
        flex-direction: column;
    }
}

/* Task 85 Addendum: Narrative review cards in topic hubs */
.atlas-hub-syntheses {
    margin-bottom: 2.25rem;
}
.atlas-card--narrative {
    border-left: 4px solid #6b4e71;
}
.atlas-card--narrative.is-draft-preview {
    border: 1px dashed #b47412;
    border-left: 4px solid #b47412;
    background: #fffcf6;
}
.atlas-badge--narrative {
    background: #f3edf5;
    color: #5b3d61;
}
.atlas-badge--draft {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}
.atlas-card__scope {
    margin: 0;
    font-size: 0.8rem;
    color: #6b6359;
}
.atlas-card__footer--split {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    justify-content: space-between;
    align-items: center;
}
.atlas-card__primary-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 700;
    color: #126b5b;
    text-decoration: none;
}
.atlas-card__primary-link:hover,
.atlas-card__primary-link:focus-visible {
    text-decoration: underline;
}
.atlas-card__meta-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: #57524a;
    text-decoration: underline;
}
