:root {
    color-scheme: light;
    --paper: #f7f6f3;
    --surface: #ffffff;
    --ink: #222320;
    --muted: #777873;
    --line: #e7e6e1;
    --accent: #526a58;
    --accent-soft: #edf3ec;
    --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img,
svg {
    max-width: 100%;
}

a {
    color: var(--accent);
    text-underline-offset: 3px;
}

a:hover {
    color: #34483a;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid #9bae9d;
    outline-offset: 3px;
}

.container {
    width: min(100% - 48px, 1160px);
    margin-inline: auto;
}

.header {
    position: sticky;
    z-index: 100;
    top: 0;
    border-bottom: 1px solid rgba(34, 35, 32, 0.08);
    background: rgba(247, 246, 243, 0.94);
    backdrop-filter: blur(14px);
}

.header-content {
    position: relative;
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.logo {
    color: var(--ink);
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.035em;
    text-decoration: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    color: var(--muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 160ms ease;
}

.nav a:hover,
.nav a.active {
    color: var(--ink);
}

.mobile-menu-btn,
.header-search summary {
    display: flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}

.mobile-menu-btn {
    display: none;
    flex-shrink: 0;
}

.header-search summary {
    gap: 10px;
    list-style: none;
}

.header-search summary::-webkit-details-marker {
    display: none;
}

.mobile-menu-btn:hover,
.mobile-menu-btn[aria-expanded="true"],
.header-search summary:hover,
.header-search[open] summary {
    background: var(--accent-soft);
}

.header-search-text {
    display: none;
}

.header-search-form {
    position: absolute;
    top: 100%;
    right: 0;
    width: min(420px, calc(100vw - 48px));
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
}

.header-search[open] .header-search-form {
    display: block;
}

.header-search-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.header-search-row {
    display: flex;
    gap: 8px;
}

.header-search-row input {
    flex: 1;
    min-width: 0;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(76px, 11vw, 148px) 0 62px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    text-align: left;
}

.hero .container {
    position: relative;
    z-index: 1;
    max-width: 1160px;
}

.hero::after {
    position: absolute;
    top: 50%;
    right: max(4vw, calc((100vw - 1320px) / 2));
    width: clamp(180px, 27vw, 350px);
    aspect-ratio: 1;
    border: 1px solid rgba(82, 106, 88, 0.12);
    border-radius: 50%;
    content: "";
    pointer-events: none;
    transform: translateY(-50%);
}

.hero-kicker,
.eyebrow {
    display: block;
    margin-bottom: 20px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
main h1 {
    max-width: 900px;
    margin: 0;
    color: var(--ink);
    font-family: var(--serif);
    font-size: clamp(2.8rem, 7.3vw, 6.1rem);
    font-weight: 500;
    letter-spacing: -0.055em;
    line-height: 0.99;
}

.hero p {
    max-width: 640px;
    margin: 25px 0 30px;
    color: var(--muted);
    font-size: clamp(1rem, 1.7vw, 1.2rem);
    line-height: 1.75;
}

.hero-cta,
.btn {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    border: 1px solid var(--ink);
    border-radius: 5px;
    background: var(--ink);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.hero-cta:hover,
.btn-primary:hover,
.btn:hover {
    border-color: #444640;
    background: #444640;
    color: #fff;
}

.hero-cta:active,
.btn:active {
    transform: scale(0.98);
}

.btn-secondary {
    border-color: var(--line);
    background: var(--surface);
    color: var(--ink);
}

.btn-secondary:hover {
    border-color: #c9c9c2;
    background: #f2f1ed;
    color: var(--ink);
}

.btn-sm {
    min-height: 38px;
    padding: 8px 13px;
    font-size: 0.81rem;
}

main {
    min-height: 58vh;
    padding: 38px 0 80px;
}

main h1 {
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    line-height: 1.04;
}

.page-intro {
    margin: 24px 0 0;
    padding: 28px 0 0;
    border-top: 1px solid var(--line);
}

.page-intro h1 {
    font-size: clamp(2.5rem, 5.6vw, 4.4rem);
}

.page-intro p {
    max-width: 580px;
    margin: 15px 0 0;
    color: var(--muted);
}

.page-banner {
    margin: 24px 0 0;
    padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 42px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f1f0ec;
    text-align: left;
}

.page-banner h1 {
    max-width: 760px;
    font-size: clamp(2.5rem, 5.6vw, 4.4rem) !important;
}

.page-banner p {
    max-width: 610px;
    margin: 14px 0 0 !important;
    color: var(--muted) !important;
    font-size: 1rem !important;
    opacity: 1 !important;
}

.editorial-cta {
    margin: 52px 0;
    padding: clamp(25px, 4vw, 42px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f1f0ec;
    text-align: left;
}

.editorial-cta p {
    max-width: 650px;
    color: var(--muted) !important;
    opacity: 1 !important;
}

.editorial-cta > a {
    margin-top: 10px;
}

main h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(1.9rem, 3vw, 2.8rem);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.13;
}

main h3 {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.015em;
}

main h1,
main h2,
main h3,
main h4 {
    color: var(--ink) !important;
}

.breadcrumbs {
    padding: 0 0 24px;
    color: var(--muted);
    font-size: 0.82rem;
}

.breadcrumbs a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--ink);
    text-decoration: underline;
}

.search-form {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    margin: 28px auto 54px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.search-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) minmax(140px, 0.7fr) auto;
    align-items: end;
    gap: 14px;
    width: 100%;
}

.form-group {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.form-group label,
.sort-controls label,
main form label {
    margin-bottom: 7px;
    color: #555650;
    font-size: 0.79rem;
    font-weight: 600;
}

.form-control,
main input:not([type="checkbox"]):not([type="radio"]),
main select,
main textarea {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #deded8;
    border-radius: 5px;
    background: #fff;
    color: var(--ink);
    font-size: 0.9rem;
}

.form-control:focus,
main input:focus,
main select:focus,
main textarea:focus {
    border-color: #929f91;
    outline: 3px solid rgba(146, 159, 145, 0.16);
}

main form[method="post"] {
    max-width: 700px;
    margin-inline: auto;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 24px;
}

.results-count {
    color: var(--muted);
    font-size: 0.88rem;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-controls label {
    margin: 0;
}

.sort-controls select {
    width: auto;
    min-width: 175px;
    min-height: 40px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 16px;
    margin: 0 0 48px;
}

.course-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.course-card:hover {
    transform: translateY(-2px);
    border-color: #cfcec7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.035);
}

.course-header {
    padding: 22px 22px 17px;
    border-bottom: 1px solid var(--line);
}

.course-title {
    margin: 0 0 9px;
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.course-title a {
    color: var(--ink);
    text-decoration: none;
}

.course-title a:hover {
    color: var(--accent);
}

.course-provider {
    overflow-wrap: anywhere;
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.course-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px 22px 22px;
}

.course-description {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 18px;
    color: #62635e;
    font-size: 0.88rem;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.course-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 12px;
    margin: auto 0 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.meta-item {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.meta-label {
    color: var(--muted);
    font-size: 0.68rem;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.meta-value {
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.meta-value.price,
.price-cell {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 600;
}

.original-price {
    color: #999a94;
    font-size: 0.77rem;
    font-weight: 400;
    text-decoration: line-through;
}

.course-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: auto;
}

.course-actions .btn {
    flex: 1 1 auto;
}

.ad-banner {
    overflow: hidden;
    margin: 28px 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.48);
    color: var(--muted);
    text-align: center;
}

.course-detail {
    margin: 14px 0 36px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.course-detail-header {
    padding: clamp(24px, 5vw, 48px);
    border-bottom: 1px solid var(--line);
}

.course-detail-title {
    max-width: 920px;
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(2.2rem, 5.6vw, 4.4rem);
    font-weight: 500;
    letter-spacing: -0.05em;
    line-height: 1.02;
}

.course-detail-header .course-provider,
.course-detail-header .course-reference {
    color: var(--muted) !important;
    font-size: 0.88rem !important;
}

.course-detail-header .course-pricing {
    min-width: 180px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
}

.course-detail-header .price {
    color: var(--accent);
    font-family: var(--serif);
    font-size: 2rem !important;
}

.course-detail-content {
    padding: clamp(22px, 4vw, 42px);
}

.detail-section {
    margin: 0 0 30px;
}

.detail-section h3 {
    margin: 0 0 12px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--line);
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 500;
}

.detail-section p,
.detail-section > div {
    color: #565751;
    line-height: 1.8;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 44px 0 10px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    min-width: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.84rem;
    text-decoration: none;
}

.pagination a:hover,
.pagination .current {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.directory-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 78px;
    border-block: 1px solid var(--line);
}

.stat-card {
    padding: 25px 22px;
}

.stat-card + .stat-card {
    border-left: 1px solid var(--line);
}

.stat-number {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
    font-family: var(--serif);
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    letter-spacing: -0.04em;
    line-height: 1.15;
}

.stat-label {
    color: var(--muted);
    font-size: 0.76rem;
}

.home-section {
    margin: 0 0 88px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 25px;
}

.section-heading p {
    max-width: 430px;
    margin: 0;
    color: var(--muted);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.category-card {
    display: flex;
    min-height: 126px;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.category-card:hover {
    transform: translateY(-2px);
    border-color: #c9c8c1;
    background: #fdfdfb;
    color: var(--ink);
}

.category-index {
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.69rem;
    letter-spacing: 0.08em;
}

.category-name {
    max-width: 170px;
    font-family: var(--serif);
    font-size: 1.2rem;
    line-height: 1.2;
}

.how-it-works {
    padding: clamp(26px, 5vw, 56px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f2f1ed;
}

.how-it-works > h2 {
    margin-bottom: 32px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.step-number {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
}

.steps-grid h3 {
    margin: 0 0 9px;
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 500;
}

.steps-grid p {
    max-width: 310px;
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.footer {
    margin-top: 20px;
    padding: 36px 0;
    background: #292a27;
    color: #e8e8e3;
    font-size: 0.78rem;
    line-height: 1.7;
    text-align: left;
}

.footer .container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 36px;
}

.footer p {
    margin: 0;
}

.footer p:first-child,
.footer p:nth-child(2) {
    max-width: 550px;
    color: #c4c5bf;
}

.footer a {
    color: #f4f3ef !important;
}

.footer a:hover {
    color: #c8d4c8 !important;
}

#backToTop {
    z-index: 99 !important;
    right: 22px !important;
    bottom: 22px !important;
    width: 42px !important;
    height: 42px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 5px !important;
    background: var(--ink) !important;
    box-shadow: none !important;
}

#backToTop:hover {
    background: #444640 !important;
}

.comparison-panel {
    border-top: 1px solid var(--line) !important;
    background: rgba(255, 255, 255, 0.97) !important;
    box-shadow: 0 -3px 16px rgba(0, 0, 0, 0.04) !important;
}

.compared-courses {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.compared-course {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--paper);
    font-size: 0.8rem;
}

.remove-btn {
    border: 0;
    background: none;
    color: var(--muted);
    cursor: pointer;
}

.comparison-table {
    width: 100%;
    border: 1px solid var(--line);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 7px;
    background: var(--surface);
}

.comparison-table th,
.comparison-table td {
    min-width: 150px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.comparison-table th {
    background: #f4f3ef !important;
    color: #53544e !important;
    font-size: 0.78rem;
    font-weight: 600;
}

.comparison-table td {
    background: var(--surface) !important;
    color: var(--ink);
    font-size: 0.88rem;
}

.comparison-table tr:last-child th,
.comparison-table tr:last-child td {
    border-bottom: 0;
}

.comparison-table .course-header-cell {
    background: #edf3ec !important;
    color: #34483a !important;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.comparison-table .course-title-cell {
    font-family: var(--serif);
    font-size: 1.15rem;
}

.comparison-table .price-cell {
    color: var(--accent);
}

.rating-form {
    margin: 18px 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fafaf8;
}

.star-rating-input {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 16px 0;
}

.star-rating-input .star,
.stars,
.star.filled {
    color: #ad9156;
}

.star-rating-input .star {
    font-size: 1.8rem;
    cursor: pointer;
}

.star-rating-input .star.empty {
    color: #d4d3ce;
}

.rating-labels {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.8rem;
}

.rating-message {
    min-height: 1.5rem;
    color: var(--muted);
    font-size: 0.86rem;
    text-align: center;
}

.rating-message.success {
    color: #346538;
}

.rating-message.error {
    color: #9f2f2d;
}

.course-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.share-btn {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 150ms ease;
}

.share-btn:hover {
    background: var(--paper);
}

.share-btn svg {
    width: 15px;
    height: 15px;
}

.facebook-share,
.twitter-share,
.whatsapp-share,
.copy-link,
.native-share {
    background: #fff;
    color: var(--ink);
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.justify-center {
    justify-content: center;
}

.align-center {
    align-items: center;
}

[style*="box-shadow"] {
    box-shadow: none !important;
}

[style*="background: white"][style*="padding"] {
    border: 1px solid var(--line);
}

[style*="border-radius: 15px"],
[style*="border-radius: 20px"] {
    border-radius: 8px !important;
}

.notification {
    z-index: 1000;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--ink);
    color: #fff;
}

.loading {
    padding: 40px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 900px) {
    .header-content {
        flex-wrap: wrap;
        gap: 0 16px;
    }

    .logo {
        flex: 1;
        min-width: 0;
    }

    .menu-ready .mobile-menu-btn:not([hidden]) {
        display: flex;
    }

    .nav {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 0 16px;
        border-top: 1px solid var(--line);
        max-height: calc(100dvh - 90px);
        overflow-y: auto;
    }

    .menu-ready .nav {
        display: none;
    }

    .menu-ready .nav.active {
        display: flex;
    }

    .nav a,
    .header-search summary {
        justify-content: flex-start;
        padding: 10px 12px;
    }

    .header-search-text {
        display: inline;
    }

    .header-search summary {
        display: none;
    }

    .header-search {
        width: 100%;
    }

    .header-search-form {
        position: static;
        display: block;
        width: 100%;
        padding: 12px;
        margin: 0 0 8px;
    }

    .courses-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .search-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .search-row > .btn {
        width: 100%;
    }

    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .directory-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat-card:nth-child(3) {
        border-left: 0;
    }

    .stat-card:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 32px, 1160px);
    }

    .header-content {
        min-height: 64px;
    }

    .logo {
        font-size: 1.13rem;
    }

    .nav {
        gap: 0;
    }

    .nav a {
        font-size: 0.82rem;
    }

    .hero {
        padding: 78px 0 48px;
    }

    .hero h1 {
        font-size: clamp(2.8rem, 13vw, 4.4rem);
    }

    .hero::after {
        right: -105px;
        opacity: 0.45;
    }

    main {
        padding: 26px 0 58px;
    }

    .search-form {
        margin: 18px auto 42px;
        padding: 17px;
    }

    .search-row,
    .courses-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .results-header,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .sort-controls {
        width: 100%;
        justify-content: space-between;
    }

    .sort-controls select {
        flex: 1;
    }

    .course-card {
        max-width: none;
    }

    .course-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .course-actions {
        flex-direction: row;
    }

    .course-detail-header,
    .course-detail-content {
        padding: 22px;
    }

    .course-detail-header > div {
        align-items: stretch !important;
        flex-direction: column;
        gap: 18px !important;
    }

    .course-detail-header .course-pricing {
        text-align: left !important;
    }

    .directory-stats {
        margin-bottom: 58px;
    }

    .stat-card {
        padding: 19px 12px;
    }

    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .category-card {
        min-height: 108px;
        padding: 14px;
    }

    .category-name {
        font-size: 1rem;
    }

    .home-section {
        margin-bottom: 60px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer .container {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .comparison-table {
        font-size: 0.82rem;
    }

    .comparison-table th,
    .comparison-table td {
        min-width: 128px;
        padding: 10px;
    }

    .comparison-panel > .container > div {
        align-items: flex-start !important;
        flex-direction: column;
        gap: 12px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        transform: translateY(12px);
        opacity: 0;
        transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1), opacity 600ms cubic-bezier(0.16, 1, 0.3, 1);
        transition-delay: calc(var(--reveal-index, 0) * 55ms);
    }

    .reveal.is-visible {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        transform: none;
        opacity: 1;
    }
}
