@font-face {
  font-family: "Inter Tight";
  src: url("../fonts/inter-tight-latin-ext-wght-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter Tight";
  src: url("../fonts/inter-tight-latin-wght-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


.landing-page {
    background: #fff;
    color: #211633;
    font-family: "Inter Tight", system-ui, sans-serif;
}

.landing-tutoring-visual {
    position: relative;
    isolation: isolate;
    align-self: stretch;
    display: grid;
    align-items: end;
    grid-template-columns: minmax(0, 1fr);
}

.landing-tutoring-visual::before,
.landing-tutoring-visual::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
    border-radius: 50% 50% 0 0 / 48% 48% 0 0;
}

.landing-tutoring-visual::before {
    inset: 0 13% 0;
    background: linear-gradient(165deg, #e5dbf9, #eee6fc);
}

.landing-tutoring-visual::after {
    inset: .65rem calc(13% + .65rem) 0;
    border: 1px solid #cbb8ed;
    border-bottom: 0;
}

.landing-tutoring-crop {
    aspect-ratio: 1402 / 617;
    overflow: hidden;
}

@media (min-width: 1280px) {
    .landing-tutoring-visual {
        width: min(calc(50vw + 1rem), 60rem);
        margin-inline-start: -5.5rem;
    }

}

.testimonial-window { overflow: hidden; }
.testimonial-track {
    display: flex;
    width: max-content;
    animation: testimonial-scroll 42s linear infinite;
}
.testimonial-window:hover .testimonial-track,
.testimonial-window:focus-within .testimonial-track,
.testimonial-window.is-paused .testimonial-track { animation-play-state: paused; }
.testimonial-group { display: flex; gap: 1rem; padding: .25rem 1rem .5rem 0; }
.testimonial-card {
    display: flex;
    flex-direction: column;
    gap: .7rem;
    width: min(22rem, calc(100vw - 3rem));
    padding: 1.5rem;
    border: 1px solid #e8e1f1;
    background: #fff;
    box-shadow: 0 3px 8px #29154a0c;
}
.testimonial-card figcaption {
    margin-top: auto;
    padding-top: .8rem;
    border-top: 1px solid #e8e1f1;
}
.testimonial-quote { color: #602aba; font-family: Georgia, serif; font-size: 3rem; line-height: .7; }
@keyframes testimonial-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
    .testimonial-toggle, .testimonial-group[aria-hidden] { display: none; }
    .testimonial-window { overflow-x: auto; }
    .testimonial-track { animation: none; }
}

.landing-container {
    width: min(74rem, 100% - 2rem);
    margin-inline: auto;
}

.landing-section {
    padding-block: clamp(3rem, 7vw, 6rem);
}

.landing-title,
.landing-heading,
.landing-page #tutor-matching-title,
.landing-subheading {
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    font-weight: 800;
}

.landing-title {
    max-width: 12ch;
    font-size: clamp(2.65rem, 5.65vw, 5.1rem);
    line-height: 1.04;
    letter-spacing: -.065em;
}

.landing-title em {
    display: block;
    color: #602aba;
    font-style: normal;
}

.services-hero-title {
    max-width: none;
    font-size: clamp(1.75rem, 4.65vw, 4rem);
}

.about-hero-title {
    max-width: none;
    font-size: clamp(1.75rem, 5vw, 4rem);
}

.curriculum-hero-title {
    max-width: none;
    font-size: clamp(1.5rem, 5.2vw, 5.1rem);
}

@media (max-width: 639px) {
    .curriculum-hero-title { text-wrap: balance; }
    .curriculum-hero-title em { display: inline; }
}

.landing-heading {
    max-width: 24ch;
    font-size: clamp(1.95rem, 3.5vw, 3.25rem);
    line-height: 1.12;
    letter-spacing: -.05em;
}

.landing-subheading {
    font-size: 1.125rem;
    line-height: 1.35;
    letter-spacing: -.025em;
}

.landing-copy {
    color: #605673;
    font-size: 1.125rem;
    line-height: 1.65;
}

.landing-photo {
    margin: 0 .75rem .75rem 0;
    background: #e2d6f5;
    box-shadow: .75rem .75rem #ded0f6;
}

.landing-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    min-height: 3rem;
    padding: .65rem 1.125rem;
    border: 1px solid #d7cbe7;
    border-radius: .375rem;
    background: #fff;
    color: #3d1e6b;
    font-weight: 750;
    line-height: 1.3;
    transition: background-color .15s ease, border-color .15s ease;
}

.landing-button:hover {
    background: #eee5fc;
    border-color: #a680d7;
}

.landing-button-primary,
.landing-button-primary:hover {
    border-color: transparent;
    background: #602aba;
    color: #fff;
}

.landing-button-primary:hover {
    background: #4a1d94;
}

.landing-link {
    color: #54269b;
    font-weight: 700;
}

.landing-link:hover {
    text-decoration: underline;
    text-underline-offset: .2em;
}

.landing-page :is(a, button):focus-visible {
    outline: 2px solid #8662ba;
    outline-offset: 4px;
}

/* ------------------------------------------------------------------ Study library: sidebar + viewer */
.library-shell { width: min(74rem, 100% - 2rem); margin-inline: auto; }
.library-layout { display: grid; gap: 2rem; }
.library-layout.is-viewing { width: min(96rem, 100% - 2rem); gap: 1.5rem; }
@media (min-width: 1024px) {
    .library-layout { grid-template-columns: 16rem minmax(0, 1fr); align-items: start; }
    .library-layout.is-viewing { grid-template-columns: 19rem minmax(0, 1fr); }
    .library-sidebar { position: sticky; top: 6.5rem; }
    .is-viewing .library-sidebar { display: flex; flex-direction: column; max-height: calc(100vh - 8rem); }
}
/* On phones the open file comes first, the list of other files after it. */
@media (max-width: 1023px) { .is-viewing .library-sidebar { order: 2; } }

.library-sidebar-label { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #605673; }
.library-cat { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-left: 3px solid transparent; color: #1d1530; font-weight: 600; font-size: .95rem; }
.library-cat svg { width: 1.15rem; height: 1.15rem; flex: none; color: #7b6d93; }
.library-cat:hover { background: #f5f1ff; }
.library-cat.is-active { background: #f0e9ff; border-left-color: #602aba; color: #4c1d95; }
.library-cat.is-active svg { color: #602aba; }
.library-count { font-size: .8rem; font-weight: 600; color: #7b6d93; font-variant-numeric: tabular-nums; }
@media (max-width: 1023px) {
    /* Categories as a scrolling row of chips on small screens. */
    .library-sidebar nav[aria-label="Resource categories"] ul { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem; }
    .library-sidebar nav[aria-label="Resource categories"] li { flex: none; }
    .library-cat { border: 1px solid #e8e1f1; border-left-width: 1px; white-space: nowrap; }
    .library-cat.is-active { border-color: #602aba; }
}

.library-list-group { font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #605673; padding: .25rem 0 .5rem; }
.library-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; padding: .9rem .25rem; }
.library-row:hover { background: #fcfbff; }
.library-row-file { display: flex; align-items: flex-start; gap: .75rem; flex: 1 1 16rem; min-width: 0; overflow-wrap: anywhere; }
.library-file-icon { display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; background: #f0e9ff; color: #602aba; }
.library-row:focus-within { background: #fcfbff; }
.library-btn { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.5rem; padding: .45rem .85rem; border: 1px solid #d7cbe7; background: #fff; color: #4c1d95; font-size: .875rem; font-weight: 700; }
.library-btn svg { width: 1rem; height: 1rem; }
.library-btn:hover { border-color: #602aba; }
.library-btn-primary { background: #602aba; border-color: #602aba; color: #fff; }
.library-btn-primary:hover { background: #4c1d95; }
.library-btn-icon { width: 2.5rem; justify-content: center; padding: 0; }

/* View mode: the list of files beside the viewer */
.library-files-head { padding-bottom: .9rem; border-bottom: 1px solid #e8e1f1; }
.library-files { overflow-y: auto; scrollbar-width: none; margin-top: .5rem; padding-right: .25rem; max-height: 22rem; }
.library-files::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) { .library-files { max-height: none; flex: 1; min-height: 0; } }
.library-files-group { position: sticky; top: 0; z-index: 1; background: #fff; padding: .6rem .5rem .3rem; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #605673; }
.library-file { display: block; padding: .5rem .6rem; }
.library-file:hover { background: #f5f1ff; }
.library-file.is-active { background: #f0e9ff; }
.library-file-title { display: block; font-size: .9rem; font-weight: 600; color: #1d1530; line-height: 1.35; }
.library-file.is-active .library-file-title { color: #4c1d95; }
.library-file-meta { display: block; font-size: .75rem; color: #7b6d93; }

/* The viewer */
.library-viewer { display: flex; flex-direction: column; height: calc(100vh - 8rem); min-height: 30rem; border: 1px solid #e8e1f1; background: #fff; }
@media (max-width: 1023px) { .library-viewer { height: 78vh; } }
.library-viewer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; padding: .75rem 1rem; border-bottom: 1px solid #e8e1f1; }
.library-viewer-sub { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .45rem 1rem; border-bottom: 1px solid #e8e1f1; background: #faf8fe; }
.library-viewer-sub[hidden] { display: none; }
.library-tabs { display: inline-flex; border: 1px solid #d7cbe7; }
.library-tabs[hidden] { display: none; }
.library-tabs a { padding: .4rem .8rem; font-size: .85rem; font-weight: 700; color: #4c1d95; }
.library-tabs a[aria-selected="true"] { background: #602aba; color: #fff; }
.library-tool { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-width: 2.25rem; height: 2.25rem; padding: 0 .6rem; border: 1px solid #d7cbe7; background: #fff; color: #1d1530; font-size: .875rem; font-weight: 700; }
.library-tool svg { width: 1rem; height: 1rem; }
.library-tool:hover:not(:disabled) { border-color: #602aba; color: #4c1d95; }
.library-tool:disabled { opacity: .4; cursor: default; }
.library-tool[hidden] { display: none; }
.library-stage { position: relative; flex: 1; min-height: 0; overflow: auto; background: #ece8f3; padding: 1rem; outline: none; }
.library-stage:focus-visible { box-shadow: inset 0 0 0 2px #602aba; }
.library-page { position: relative; margin: 0 auto 1rem; background: #fff; box-shadow: 0 1px 3px #1d153026, 0 8px 24px -12px #1d153040; }
.library-page canvas { display: block; width: 100%; height: 100%; }
.library-stage img.library-image { display: block; max-width: 100%; margin: 0 auto; background: #fff; }
.library-stage-note { max-width: 28rem; margin: 3rem auto; padding: 1.25rem 1.5rem; background: #fff; border: 1px solid #e8e1f1; text-align: center; color: #605673; }
.library-gate { max-width: 26rem; margin: 3rem auto; padding: 2rem; background: #fff; border: 1px solid #e8e1f1; border-top: 3px solid #602aba; text-align: center; }
.library-shell.is-wide { width: min(96rem, 100% - 2rem); }
.library-layout > * { min-width: 0; }
.library-files-jump { display: none; }
.library-viewer, #library-files { scroll-margin-top: 6.5rem; }
.library-tool:focus-visible, .library-btn:focus-visible, .library-file:focus-visible, .library-cat:focus-visible {
    outline: 2px solid #602aba;
    outline-offset: 2px;
}
@media (max-width: 1023px) { .library-files-jump { display: inline-flex; } }
@media (max-width: 639px) {
    .library-viewer-bar > div:first-child { flex-basis: 100%; }   /* title on its own line above the tabs */
    .library-viewer-bar h1 { white-space: normal; }
    .library-tool { min-width: 2.75rem; min-height: 2.75rem; }
    .library-row > div:last-child { margin-inline-start: 3.25rem; }
}

/* Tutoring nudge under the in-page file viewer */
.library-viewer-help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; border-top: 1px solid #e8e1f1; background: #faf8fe; padding: .75rem 1rem; font-size: .875rem; color: #3b3150; }
.library-viewer-help p { min-width: 0; flex: 1 1 16rem; }

/* Home page tutor carousel */
.tutor-carousel { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 1.25rem) / 4); column-gap: 1.25rem; margin-top: 2rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding: .25rem .125rem .75rem; }
.tutor-carousel::-webkit-scrollbar { display: none; }
.tutor-carousel:focus-visible { outline: 2px solid #6d28d9; outline-offset: 4px; }
.tutor-slide { min-width: 0; scroll-snap-align: start; }
@media (max-width: 64rem) { .tutor-carousel { grid-auto-columns: calc((100% - 2 * 1.25rem) / 3); } }
@media (max-width: 48rem) { .tutor-carousel { grid-auto-columns: calc((100% - 1.25rem) / 2); } }
@media (max-width: 32rem) { .tutor-carousel { grid-auto-columns: 82%; column-gap: 1rem; } }
.tutor-carousel-arrow { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid #d7cbe7; border-radius: 9999px; background: #fff; color: #4c1d95; transition: background-color .15s, opacity .15s; }
.tutor-carousel-arrow:hover:not(:disabled) { background: #f5f3ff; }
.tutor-carousel-arrow:disabled { opacity: .35; cursor: default; }
.tutor-carousel-arrow svg { width: 1.25rem; height: 1.25rem; }
.tutor-carousel-dot { width: .5rem; height: .5rem; border-radius: 9999px; background: #d7cbe7; transition: width .2s, background-color .2s; }
.tutor-carousel-dot.is-active { width: 1.5rem; background: #6d28d9; }
