/*
 * EDUEX layout — site header, navigation, footer, page chrome.
 * Reads from --edx-* tokens defined in eduex-tokens.css.
 */

/* ------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------ */
.edx-hero {
    max-width: 880px;
    margin: 0 auto var(--edx-space-lg);
    padding: var(--edx-space-md) 0 var(--edx-space-lg);
}
.edx-hero__title {
    font-size: var(--edx-fs-display);
    font-weight: var(--edx-fw-bold);
    line-height: var(--edx-lh-display);
    letter-spacing: var(--edx-ls-display);
    color: var(--edx-on-background);
    margin: 0 0 var(--edx-space-md);
    max-width: 18ch;
    text-wrap: balance;
}
.edx-hero__lede {
    font-size: var(--edx-fs-body-lg);
    line-height: var(--edx-lh-body-lg);
    color: var(--edx-on-surface-variant);
    max-width: 60ch;
    margin: 0 0 var(--edx-space-lg);
}
.edx-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: var(--edx-space-sm);
}
@media (max-width: 640px) {
    .edx-hero__ctas { flex-direction: column; }
    .edx-hero__ctas .edx-btn { width: 100%; }
}

/* ------------------------------------------------------------------
   Skip link
   ------------------------------------------------------------------ */
.edx-skip-link {
    position: absolute;
    top: -100px;
    left: var(--edx-space-sm);
    z-index: 1000;
    padding: 12px 20px;
    background: var(--edx-primary);
    color: var(--edx-on-primary);
    border-radius: var(--edx-radius-md);
    font-family: var(--edx-font-family);
    font-weight: var(--edx-fw-medium);
    text-decoration: none;
    transition: top var(--edx-dur-fast) var(--edx-ease);
}
.edx-skip-link:focus { top: var(--edx-space-sm); color: var(--edx-on-primary); }

/* ------------------------------------------------------------------
   Site header
   ------------------------------------------------------------------ */
.edx-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--edx-surface);
    border-bottom: 1px solid var(--edx-surface-variant);
    backdrop-filter: saturate(180%) blur(8px);
}
.edx-header__inner {
    max-width: var(--edx-container-max);
    margin: 0 auto;
    padding: var(--edx-space-sm) var(--edx-space-md);
    display: flex;
    align-items: center;
    gap: var(--edx-space-md);
}
.edx-header__brand {
    display: inline-flex;
    align-items: center;
    gap: var(--edx-space-xs);
    text-decoration: none;
    color: var(--edx-on-background);
    font-family: var(--edx-font-family);
    font-size: var(--edx-fs-title-lg);
    font-weight: var(--edx-fw-bold);
    letter-spacing: -0.02em;
}
.edx-header__brand:hover { color: var(--edx-primary); text-decoration: none; }
.edx-header__brand-mark {
    width: 92px;;
    height: 40px;
    border-radius: var(--edx-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    object-fit: contain;
}
.edx-header__nav {
    flex: 1;
    display: flex;
    justify-content: center;
}
.edx-nav { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--edx-space-md); }
.edx-nav__item { display: inline-flex; }
.edx-nav__link {
    display: inline-flex;
    align-items: center;
    padding: 8px 4px;
    font-family: var(--edx-font-family);
    font-size: var(--edx-fs-label-md);
    font-weight: var(--edx-fw-medium);
    color: var(--edx-on-surface);
    text-decoration: none;
    position: relative;
    transition: color var(--edx-dur-fast) var(--edx-ease);
}
.edx-nav__link::after {
    content: "";
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 0;
    height: 2px;
    background: var(--edx-primary);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--edx-dur-medium) var(--edx-ease);
    border-radius: var(--edx-radius-pill);
}
.edx-nav__link:hover,
.edx-nav__link:focus-visible { color: var(--edx-primary); text-decoration: none; }
.edx-nav__link:hover::after,
.edx-nav__link:focus-visible::after,
.edx-nav__link.is-active::after { transform: scaleX(1); }
.edx-nav__link.is-active { color: var(--edx-primary); }
.edx-header__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--edx-space-xs);
}

/* Hamburger (mobile) */
.edx-header__menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--edx-outline-variant);
    border-radius: var(--edx-radius);
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--edx-on-surface);
}
.edx-header__menu-toggle:hover { border-color: var(--edx-primary); color: var(--edx-primary); }

@media (max-width: 860px) {
    .edx-header__nav { display: none; }
    .edx-header__nav.is-open {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--edx-surface);
        border-bottom: 1px solid var(--edx-surface-variant);
        box-shadow: var(--edx-elev-md);
        padding: var(--edx-space-sm) var(--edx-space-md) var(--edx-space-md);
    }
    .edx-header__nav.is-open .edx-nav { flex-direction: column; gap: var(--edx-space-xs); width: 100%; }
    .edx-header__nav.is-open .edx-nav__link { padding: 12px 4px; }
    .edx-header__brand { flex: 1; }
    .edx-header__menu-toggle { display: inline-flex; margin-left: auto; }
    .edx-header__cta .edx-btn--ghost { display: none; }
}

/* ------------------------------------------------------------------
   Site footer
   ------------------------------------------------------------------ */
.edx-footer {
    background: var(--edx-surface-dim);
    color: var(--edx-on-surface);
    font-family: var(--edx-font-family);
    margin-top: var(--edx-space-xl);
    border-top: 1px solid var(--edx-surface-variant);
}
.edx-footer__inner {
    max-width: var(--edx-container-max);
    margin: 0 auto;
    padding: var(--edx-space-xl) var(--edx-space-md) var(--edx-space-md);
    position: relative;
    padding-top: calc(var(--edx-space-xl) + 2px);
}
.edx-footer__inner::before {
    content: "";
    position: absolute;
    top: 0;
    left: var(--edx-space-md);
    width: 56px;
    height: 2px;
    background: var(--edx-primary);
    border-radius: var(--edx-radius-pill);
}
.edx-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: var(--edx-space-lg);
}
.edx-footer__col h4 {
    font-size: var(--edx-fs-label-md);
    font-weight: var(--edx-fw-semibold);
    color: var(--edx-on-background);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--edx-space-sm);
}
.edx-footer__col p,
.edx-footer__col li {
    font-size: var(--edx-fs-body-md);
    line-height: var(--edx-lh-body-md);
    color: var(--edx-on-surface-variant);
}
.edx-footer__col ul { list-style: none; padding: 0; margin: 0; }
.edx-footer__col li { margin-bottom: 8px; }
.edx-footer__col a {
    color: var(--edx-on-surface);
    text-decoration: none;
    transition: color var(--edx-dur-fast) var(--edx-ease);
}
.edx-footer__col a:hover { color: var(--edx-primary); text-decoration: underline; }
.edx-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: var(--edx-space-xs);
    text-decoration: none;
    color: var(--edx-on-background);
    font-size: var(--edx-fs-title-lg);
    font-weight: var(--edx-fw-bold);
    letter-spacing: -0.02em;
    margin-bottom: var(--edx-space-sm);
}
.edx-footer__brand-mark {
    width: 92px;
	height: 40px; border-radius: var(--edx-radius-sm);
    display: inline-flex; align-items: center; justify-content: center;
    object-fit: contain;
}
.edx-footer__bottom {
    border-top: 1px solid var(--edx-surface-variant);
    margin-top: var(--edx-space-lg);
    padding-top: var(--edx-space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--edx-space-sm);
    font-size: var(--edx-fs-label-md);
    color: var(--edx-on-surface-variant);
    flex-wrap: wrap;
}

@media (max-width: 860px) {
    .edx-footer__grid { grid-template-columns: 1fr 1fr; gap: var(--edx-space-md); }
}
@media (max-width: 540px) {
    .edx-footer__grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------
   Page content area
   ------------------------------------------------------------------ */
.edx-main { min-height: 60vh; }
.edx-page__main { font-size: var(--edx-fs-body-md); line-height: var(--edx-lh-body-md); color: var(--edx-on-surface); }
.edx-page__main > * + * { margin-top: var(--edx-space-md); }
.edx-page__main h2 { margin-top: var(--edx-space-lg); }
.edx-page__main h3 { margin-top: var(--edx-space-md); }
.edx-page__main a:not(.edx-btn):not(.eduex-pay-edit):not(.eduex-download-link) {
    color: var(--edx-secondary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}
.edx-page__main a:not(.edx-btn):not(.eduex-pay-edit):not(.eduex-download-link):hover {
    color: var(--edx-on-secondary-container);
}
.edx-page__main blockquote {
    border-left: 2px solid var(--edx-primary);
    padding: var(--edx-space-xs) var(--edx-space-md);
    color: var(--edx-on-surface-variant);
    font-style: italic;
    margin: var(--edx-space-md) 0;
}
.edx-page__main code {
    background: var(--edx-surface-container-low);
    color: var(--edx-on-surface);
    padding: 2px 6px;
    border-radius: var(--edx-radius-sm);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
}
.edx-page__main pre {
    background: var(--edx-inverse-surface);
    color: var(--edx-inverse-on-surface);
    padding: var(--edx-space-md);
    border-radius: var(--edx-radius);
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: var(--edx-fs-body-md);
}
.edx-page__main img { max-width: 100%; height: auto; border-radius: var(--edx-radius); }

/* ------------------------------------------------------------------
   Post list (archive + index)
   ------------------------------------------------------------------ */
.edx-post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--edx-space-md); }
.edx-post-list__item { margin: 0; }
.edx-post-card {
    display: block;
    padding: var(--edx-space-md);
    background: var(--edx-surface);
    border: 1px solid var(--edx-surface-variant);
    border-radius: var(--edx-radius-lg);
    box-shadow: var(--edx-elev-sm);
    text-decoration: none;
    color: inherit;
    transition:
        background-color var(--edx-dur-medium) var(--edx-ease),
        box-shadow       var(--edx-dur-medium) var(--edx-ease),
        transform        var(--edx-dur-medium) var(--edx-ease);
}
.edx-post-card:hover {
    background: var(--edx-surface-container-low);
    box-shadow: var(--edx-elev-lg);
    text-decoration: none;
}
.edx-post-card__meta {
    font-size: var(--edx-fs-label-sm);
    color: var(--edx-on-surface-variant);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--edx-space-xs);
}
.edx-post-card__title {
    font-size: var(--edx-fs-title-lg);
    font-weight: var(--edx-fw-semibold);
    color: var(--edx-on-background);
    margin: 0 0 var(--edx-space-xs);
}
.edx-post-card__excerpt {
    font-size: var(--edx-fs-body-md);
    color: var(--edx-on-surface-variant);
    margin: 0;
}

/* ------------------------------------------------------------------
   Search form
   ------------------------------------------------------------------ */
.edx-search-form {
    display: flex;
    gap: var(--edx-space-xs);
    max-width: 480px;
}
.edx-search-form input[type="search"] {
    flex: 1;
    height: 48px;
    padding: 0 16px;
    background: var(--edx-surface);
    color: var(--edx-on-surface);
    border: 1px solid var(--edx-outline-variant);
    border-radius: var(--edx-radius);
    font-family: var(--edx-font-family);
    font-size: 16px;
    transition:
        border-color var(--edx-dur-fast) var(--edx-ease),
        box-shadow   var(--edx-dur-fast) var(--edx-ease);
}
.edx-search-form input[type="search"]:focus {
    border-color: var(--edx-primary);
    box-shadow: var(--edx-focus-ring);
    outline: none;
}

/* ------------------------------------------------------------------
   Comments
   ------------------------------------------------------------------ */
.edx-comments { margin-top: var(--edx-space-lg); }
.edx-comments .comment-list { list-style: none; padding: 0; margin: 0; }
.edx-comments .comment-body {
    background: var(--edx-surface);
    border: 1px solid var(--edx-surface-variant);
    border-radius: var(--edx-radius);
    padding: var(--edx-space-md);
    margin-bottom: var(--edx-space-sm);
}
.edx-comments .comment-author { font-weight: var(--edx-fw-semibold); color: var(--edx-on-background); }
.edx-comments .comment-meta { font-size: var(--edx-fs-label-sm); color: var(--edx-on-surface-variant); }
.edx-comments input[type="text"],
.edx-comments input[type="email"],
.edx-comments input[type="url"],
.edx-comments textarea {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    background: var(--edx-surface);
    color: var(--edx-on-surface);
    border: 1px solid var(--edx-outline-variant);
    border-radius: var(--edx-radius);
    font-family: var(--edx-font-family);
    font-size: 16px;
    box-sizing: border-box;
    margin-bottom: var(--edx-space-sm);
}
.edx-comments textarea { height: auto; padding: 12px 16px; line-height: var(--edx-lh-body-md); }
.edx-comments input:focus,
.edx-comments textarea:focus {
    border-color: var(--edx-primary);
    box-shadow: var(--edx-focus-ring);
    outline: none;
}
.edx-comments .form-submit { margin-top: var(--edx-space-sm); }
.edx-comments .submit,
.edx-comments #submit {
    height: 48px;
    padding: 13px 34px;
    background: var(--edx-primary);
    color: var(--edx-on-primary);
    border: 2px solid var(--edx-primary);
    border-radius: var(--edx-radius-md);
    font-family: var(--edx-font-family);
    font-size: var(--edx-fs-body-md);
    font-weight: var(--edx-fw-medium);
    cursor: pointer;
    transition: background-color var(--edx-dur-medium) var(--edx-ease), border-color var(--edx-dur-medium) var(--edx-ease);
}
.edx-comments .submit:hover,
.edx-comments #submit:hover {
    background: var(--edx-primary-hover);
    border-color: var(--edx-primary-hover);
}

/* ------------------------------------------------------------------
   Sidebar widgets
   ------------------------------------------------------------------ */
.edx-sidebar .widget {
    background: var(--edx-surface);
    border: 1px solid var(--edx-surface-variant);
    border-radius: var(--edx-radius-lg);
    padding: var(--edx-space-md);
    box-shadow: var(--edx-elev-sm);
    margin-bottom: var(--edx-space-md);
}
.edx-sidebar .widget-title {
    font-size: var(--edx-fs-label-md);
    font-weight: var(--edx-fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--edx-space-sm);
}
.edx-sidebar .widget ul { list-style: none; padding: 0; margin: 0; }
.edx-sidebar .widget li { padding: 8px 0; border-bottom: 1px solid var(--edx-surface-variant); }
.edx-sidebar .widget li:last-child { border-bottom: 0; }

/* ------------------------------------------------------------------
   Homepage — audience cards
   ------------------------------------------------------------------ */
.edx-home-routes {
    max-width: var(--edx-container-max);
    margin: 0 auto;
    padding: 0 var(--edx-space-md) var(--edx-space-xl);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--edx-space-md);
}
.edx-route-card {
    background: var(--edx-surface);
    border: 1px solid var(--edx-surface-variant);
    border-radius: var(--edx-radius-lg);
    box-shadow: var(--edx-elev-md);
    padding: var(--edx-space-lg);
    text-decoration: none;
    color: var(--edx-on-background);
    display: flex;
    flex-direction: column;
    gap: var(--edx-space-sm);
    transition: box-shadow 200ms ease-in-out, transform 200ms ease-in-out;
}
.edx-route-card:hover,
.edx-route-card:focus-visible {
    box-shadow: var(--edx-elev-lg);
    transform: translateY(-2px);
    text-decoration: none;
    outline: none;
}
.edx-route-card__eyebrow {
    font-size: var(--edx-fs-label-sm);
    font-weight: var(--edx-fw-medium);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--edx-primary);
}
.edx-route-card__title {
    font-size: var(--edx-fs-headline-md);
    font-weight: var(--edx-fw-semibold);
    line-height: var(--edx-lh-headline-md);
    margin: 0;
    color: var(--edx-on-background);
}
.edx-route-card__body {
    font-size: var(--edx-fs-body-md);
    line-height: var(--edx-lh-body-md);
    color: var(--edx-on-surface-variant);
    margin: 0;
    flex: 1;
}
.edx-route-card__cta {
    margin-top: var(--edx-space-sm);
    align-self: flex-start;
}

@media (max-width: 640px) {
    .edx-home-routes { grid-template-columns: 1fr; }
    .edx-route-card__cta { width: 100%; align-self: stretch; text-align: center; padding: 0px;}
}

/* ------------------------------------------------------------------
   Homepage — trust strip
   ------------------------------------------------------------------ */
.edx-trust {
    background: var(--edx-surface-dim);
    border-top: 1px solid var(--edx-surface-variant);
    border-bottom: 1px solid var(--edx-surface-variant);
    padding: var(--edx-space-md) 0;
}
.edx-trust__inner {
    max-width: var(--edx-container-max);
    margin: 0 auto;
    padding: 0 var(--edx-space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--edx-space-lg);
    flex-wrap: wrap;
}
.edx-trust__logos {
    display: flex;
    align-items: center;
    gap: var(--edx-space-md);
}
.edx-trust__logos img {
    height: 24px;
    width: auto;
    opacity: 0.85;
}
.edx-trust__note {
    font-size: var(--edx-fs-label-sm);
    color: var(--edx-on-surface-variant);
    display: inline-flex;
    align-items: center;
    gap: var(--edx-space-xs);
}
.edx-trust__note img { height: 18px; width: auto; }

/* ------------------------------------------------------------------
   Homepage — how it works
   ------------------------------------------------------------------ */
.edx-how {
    max-width: var(--edx-container-max);
    margin: 0 auto;
    padding: var(--edx-space-xl) var(--edx-space-md);
}
.edx-how__title {
    font-size: var(--edx-fs-headline-lg);
    font-weight: var(--edx-fw-semibold);
    line-height: var(--edx-lh-headline-lg);
    margin: 0 0 var(--edx-space-lg);
    text-align: center;
    color: var(--edx-on-background);
}
.edx-how__steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--edx-space-lg);
    counter-reset: edx-step;
}
.edx-step { text-align: center; }
.edx-step__num {
    width: 40px;
    height: 40px;
    border-radius: var(--edx-radius-pill);
    background: var(--edx-primary-container);
    color: var(--edx-on-primary-container);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--edx-fs-label-md);
    font-weight: var(--edx-fw-semibold);
    margin: 0 auto var(--edx-space-sm);
}
.edx-step__title {
    font-size: var(--edx-fs-title-lg);
    font-weight: var(--edx-fw-semibold);
    line-height: var(--edx-lh-title-lg);
    margin: 0 0 var(--edx-space-xs);
    color: var(--edx-on-background);
}
.edx-step__body {
    font-size: var(--edx-fs-body-md);
    line-height: var(--edx-lh-body-md);
    color: var(--edx-on-surface-variant);
    margin: 0;
    max-width: 32ch;
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 640px) {
    .edx-how__steps { grid-template-columns: 1fr; gap: var(--edx-space-md); }
}

/* ------------------------------------------------------------------
   Homepage — contact reminder
   ------------------------------------------------------------------ */
.edx-home-contact {
    max-width: var(--edx-container-max);
    margin: 0 auto;
    padding: var(--edx-space-lg) var(--edx-space-md) var(--edx-space-xl);
    text-align: center;
}
.edx-home-contact p {
    font-size: var(--edx-fs-body-md);
    line-height: var(--edx-lh-body-md);
    color: var(--edx-on-surface-variant);
    margin: 0;
}
.edx-home-contact a {
    color: var(--edx-secondary);
    text-decoration: none;
    transition: color 150ms ease-in-out;
}
.edx-home-contact a:hover { color: var(--edx-primary); text-decoration: underline; }