/* Learnpali shared chrome. The header uses the wagtail.org primary menu.
   Typography matches Wagtail admin via corpus/css/inscribe-fonts.css
   (loaded from patterns/base.html on every public page). */

body.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    --learnpali-surface-border: 1px solid var(--color-grey, #e0e0e0);
    --learnpali-surface-radius: 0.5rem;
    --learnpali-surface-bg: #fff;
    --learnpali-catalog-surface-border: 1px solid #e4eeee;
    --learnpali-catalog-surface-radius: 0.85rem;
    /* Public ink and teal shared by the home page, the catalog, and the practice player. */
    --learnpali-ink: #142222;
    --learnpali-ink-soft: #1c2b2b;
    --learnpali-teal: #0b5c5d;
    --learnpali-teal-pressed: #084646;
}

body.app .app__content {
    flex: 1 0 auto;
}

/* Block-level headers center with margin auto; as flex items that shrinks the
   header box and breaks desktop sub-nav positioning (left/right inset). */
body.app > .app__header.header {
    align-self: center;
    width: 100%;
    max-width: 1440px;
    margin-inline: 0;
}

body.app > .learnpali-footer {
    align-self: stretch;
    width: 100%;
}

.learnpali-site-header {
    z-index: 30;
}

@media (min-width: 1200px) {
    .sub-nav--links-only .sub-nav__links {
        flex-basis: 100%;
        min-width: 100%;
        max-width: 100%;
    }
}

.learnpali-section {
    max-width: 46rem;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 4.5rem;
}

.learnpali-section h1 {
    margin: 0 0 0.75rem;
    color: var(--color--heading, #111);
    font-size: 2.5rem;
    line-height: 1.8;
}

.learnpali-section p {
    margin: 0;
    color: var(--color--text, #262626);
    font-size: 1.125rem;
    line-height: 1.8;
}

.learnpali-footer {
    background: #123c3d;
    color: #f4fbfb;
    padding: 1.25rem 1.5rem;
}

.learnpali-footer__credit {
    max-width: 76rem;
    margin: 0 auto;
    color: #e7f7f6;
    font-size: 0.85rem;
    text-align: center;
}

/* Task Management page: space between quote and task list. */
.template-task-management-page .standalone-quote {
    margin-bottom: 2.5rem;
}

@media (min-width: 1024px) {
    .template-task-management-page .standalone-quote {
        margin-bottom: 3.5rem;
    }
}

.template-task-management-page .tasks-block {
    margin-bottom: 4rem;
}

/* Patron page: vertical rhythm and sign-up button placement. */
.template-patron-page .hero {
    margin-bottom: 75px;
}

@media (min-width: 1024px) {
    .template-patron-page .hero {
        margin-bottom: 100px;
    }
}

.template-patron-page .rich-text--sf {
    margin-bottom: 50px;
}

.template-patron-page .grid--comparison-table {
    margin-bottom: 0;
}

.template-patron-page .comparison-table {
    padding-bottom: 0;
    table-layout: fixed;
    width: 100%;
}

.template-patron-page .comparison-table :is(th, td):nth-child(1) {
    width: 150px;
}

.template-patron-page .comparison-table :is(th, td):nth-child(2),
.template-patron-page .comparison-table :is(th, td):nth-child(3) {
    width: calc((100% - 150px) / 2);
    text-align: center;
}

@media (min-width: 1023px) {
    .template-patron-page .comparison-table :is(th, td):nth-child(1) {
        width: 250px;
    }

    .template-patron-page .comparison-table :is(th, td):nth-child(2),
    .template-patron-page .comparison-table :is(th, td):nth-child(3) {
        width: calc((100% - 250px) / 2);
        text-align: center;
    }
}

.template-patron-page .grid--comparison-table + .grid .cta-block {
    margin-top: 32px;
    margin-bottom: 48px;
    grid-column: 2 / span 2;
    display: grid;
    grid-template-columns: 150px 1fr 1fr;
    width: 100%;
    max-width: 100%;
}

.template-patron-page .grid--comparison-table + .grid .cta-block > .button {
    grid-column: 3;
    justify-self: center;
    width: max-content;
    max-width: 100%;
}

@media (min-width: 599px) {
    .template-patron-page .grid--comparison-table + .grid .cta-block {
        grid-column: 2 / span 3;
    }
}

@media (min-width: 1023px) {
    .template-patron-page .grid--comparison-table + .grid .cta-block {
        grid-column: 3 / span 3;
        grid-template-columns: 250px 1fr 1fr;
    }
}

.template-patron-page .icon-bullets {
    margin-top: 0;
    margin-bottom: 64px;
}

.template-patron-page .icon-bullets .icon-bullet:last-child {
    margin-bottom: 0;
}

/* Language switch sits after the account control and before the menu button. Flag only.
   The shared header shifts the menu button up by 7px, which leaves the flag low.
   Keep the flag and the menu button on the header's center line. */
.learnpali-language {
    display: flex;
    align-items: center;
    align-self: center;
    flex: 0 0 auto;
    margin-left: 8px;
    margin-right: 4px;
}

@media (max-width: 1199px) {
    .learnpali-site-header .header__menu-toggle {
        top: 0;
        display: flex;
        align-items: center;
        align-self: center;
        height: 40px;
    }
}

.learnpali-language__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    line-height: 0;
    text-decoration: none;
    outline-offset: 4px;
}

.learnpali-language__flag {
    display: block;
    width: 26px;
    height: auto;
    border-radius: 2px;
}

.learnpali-language__link:hover,
.learnpali-language__link:focus {
    background: transparent;
    opacity: 0.75;
}

/* Member account control in header (sub-nav panel + kit Get started button). */
.header__nav--desktop {
    gap: 0;
}

.header__nav--desktop .learnpali-member-nav {
    margin-left: auto;
}

/* Mobile nav is a column. margin-left: auto would shrink this control and
   wrap the chevron under the name. Stretch it, and keep the name and chevron
   on one row. */
.header__nav--mobile .learnpali-member-nav {
    margin-left: 0;
    width: 100%;
}

.header__nav--mobile .learnpali-member-nav__toggle {
    display: inline-flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: center;
}

.header__nav--mobile .learnpali-member-nav__toggle svg {
    flex: 0 0 auto;
}

.header__nav--desktop .learnpali-member-nav__login {
    flex-shrink: 0;
}

/* Toggle uses kit .button + .header__button--get-started (opens account MicroModal). */

.learnpali-member-nav__logout {
    margin: 0;
    width: 100%;
}

.learnpali-account-modal .learnpali-member-nav__logout-button {
    appearance: none;
    background: none;
    border: 0;
    color: inherit;
    column-gap: 15px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    font: inherit;
    text-align: inherit;
    text-decoration: none;
    width: 100%;
}
