
:root{--navy:#05264f;--deep:#062750;--ink:#092958;--cyan:#23c3e9;--white:#fff}
*{box-sizing:border-box}html{background:#fff}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:white;color:var(--ink);min-height:100vh;display:flex;flex-direction:column}
.site-header{position:relative;z-index:50;background:#fff;flex:0 0 auto;box-shadow:0 1px 6px #061a3012}
.header-row{height:89px;display:flex;align-items:center;gap:clamp(10px,1.7vw,28px);padding:12px clamp(14px,3.2vw,52px)}
.brand{flex:0 0 auto;text-decoration:none;color:#08275b;font-family:Georgia,'Times New Roman',serif;font-weight:400;font-size:clamp(23px,2.45vw,38px);letter-spacing:-.022em;white-space:nowrap;line-height:1}
.brand-separator{height:28px;width:1px;background:#8b9bb2;flex:0 0 1px}
.ps-home-tools{display:flex;align-items:center;gap:0;flex:1 1 600px;min-width:0;max-width:760px;margin-left:0;height:49px;background:#fff;border:1px solid #7290ba;box-shadow:0 3px 9px #001a3324;border-radius:999px;padding:4px 5px 4px 16px}
#ps-home-search{display:flex;align-items:center;flex:1 1 auto;min-width:0;height:100%;margin:0;gap:12px}
.ps-search-icon{color:#092b60;flex:0 0 auto;width:23px;height:23px;pointer-events:none}
#ps-home-query{width:100%;min-width:0;flex:1;border:0;background:transparent;color:#12334f;font-size:16px;outline:0;padding:0;height:100%;font-family:Arial,sans-serif}
#ps-home-query::placeholder{color:#566780;opacity:1}
.ps-search-submit{background:transparent;border:0;width:31px;height:33px;padding:5px;display:none;color:#092b60;cursor:pointer}
.ps-home-tools:focus-within{box-shadow:0 0 0 3px #2a9dcd35,0 3px 9px #001a3324}
.ps-tool-divider{width:1px;height:26px;background:#8b9bb2;margin:0 13px 0 6px;flex:0 0 1px}
.ps-ai-tutor-button{border:0;border-radius:999px;background:linear-gradient(#0b397c,#062558);color:white;font-size:14px;font-weight:600;white-space:nowrap;height:37px;padding:0 20px;cursor:pointer;flex:0 0 auto}
.ps-ai-tutor-button:hover,.ps-ai-tutor-button:focus-visible{outline:2px solid #3dadd0;outline-offset:2px;background:#124881}
.main-nav{margin-left:auto;display:flex;align-items:center;gap:13px;flex:0 0 auto}
.main-nav a{display:inline-flex;align-items:center;justify-content:center;height:30px;min-width:88px;padding:0 14px;border:1px solid #496aa0;border-radius:999px;color:#0b2a55;text-decoration:none;font-size:13px;background:white}
.main-nav a[aria-current="page"]{color:white;background:#062c60}
.main-nav a:hover,.main-nav a:focus-visible{box-shadow:0 0 0 2px #23c3e950;outline:0}
.ps-search-message{position:absolute;top:69px;left:38%;font-size:12px;border-radius:7px;color:#fff;background:#07345a;padding:6px 12px;box-shadow:0 4px 10px #001a3328}
.ps-search-message[hidden]{display:none}
.ps-visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* Navy canvas and cards */
.home-content{flex:1 1 auto;display:flex;min-height:0;width:100%;margin:0;padding:0 6px 0;}
.subject-grid{background:#062650;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:clamp(13px,1.05vw,19px);padding:clamp(17px,1.5vw,27px);width:100%;min-height:0;align-items:stretch}
.subject-card{position:relative;display:flex;flex-direction:column;min-width:0;min-height:0;background:#fff;border-radius:21px;text-decoration:none;color:var(--ink);overflow:hidden;box-shadow:0 4px 9px #00132b35;transition:transform .15s ease,box-shadow .15s ease}
.subject-card:hover{transform:translateY(-3px);box-shadow:0 10px 22px #00132b66}
.subject-card:focus-visible{outline:3px solid #42cfe5;outline-offset:3px}
.subject-card img{width:100%;height:66%;min-height:0;object-fit:cover;object-position:center;display:block;filter:saturate(.88) contrast(.95);border-radius:18px 18px 12px 12px;flex:1 1 auto;max-height:75%}
.subject-card .card-copy{position:relative;display:flex;flex-direction:column;justify-content:center;flex:0 0 auto;height:27%;min-height:64px;padding:7px 40px 8px 18px}
.subject-card .card-copy b{font:normal clamp(17px,1.45vw,24px)/1.06 Georgia,'Times New Roman',serif;color:#062552;letter-spacing:-.015em}
.subject-card .card-copy em{font:normal clamp(12px,1vw,16px)/1.17 Arial,sans-serif;color:#09264d;margin-top:6px}
.subject-card .card-arrow{position:absolute;right:12px;bottom:15px;width:27px;height:27px;display:grid;place-items:center;border:1px solid #5278ab;border-radius:50%;color:#0a3870;font-size:19px;line-height:1;background:#fff}
.home-footer{display:none}
/* Pilot dialog preserved and not presented as a live public AI service */
.ps-tutor-backdrop[hidden]{display:none!important}.ps-tutor-backdrop{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:18px;background:#00131fcc;backdrop-filter:blur(5px)}
.ps-tutor-panel{position:relative;width:min(520px,100%);padding:30px;border:1px solid #23d8ee;border-radius:16px;background:linear-gradient(155deg,#0b2d49,#041725);color:#e9f4f9;box-shadow:0 20px 60px #000a;font:15px/1.55 Arial,Helvetica,sans-serif;outline:none}
.ps-tutor-close{position:absolute;right:14px;top:10px;border:0;background:none;color:#cde9f2;cursor:pointer;font-size:28px;line-height:1;padding:4px 8px}
.ps-tutor-close:hover,.ps-tutor-close:focus-visible{color:white;outline:2px solid #23d8ee;border-radius:6px}
.ps-tutor-eyebrow{font:700 10px/1.5 Arial,sans-serif;letter-spacing:.17em;color:#92dbeb}
.ps-tutor-panel h2{font:400 34px/1.15 Georgia,'Times New Roman',serif;margin:12px 0;color:#fff}
.ps-tutor-panel p{margin:12px 0;color:#c9dce7}
.ps-tutor-status{display:flex;align-items:start;gap:13px;margin-top:22px;padding:15px;border:1px solid #2f7185;border-radius:10px;background:#0a354e}
.ps-tutor-status>span{color:#5fe3ed;font-size:21px}.ps-tutor-status strong{display:block;color:#f5fcff;margin-bottom:2px}
.ps-tutor-status div span{display:block;font-size:13px;color:#c5e1e9}.ps-tutor-panel .ps-tutor-note{font-size:13px;margin-top:18px}
@media(max-width:1220px){.header-row{height:auto;min-height:90px;flex-wrap:wrap;gap:10px;padding:12px 20px}.brand{font-size:28px}.brand-separator{display:none}.ps-home-tools{order:3;flex-basis:100%;max-width:none}.main-nav{margin-left:auto}.subject-grid{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:none;grid-auto-rows:clamp(235px,27vw,295px);}.subject-card img{height:65%;}.subject-card .card-copy{height:auto;flex:1;}}
@media(max-width:850px){.subject-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:265px}.subject-card .card-copy b{font-size:18px}.subject-card .card-copy em{font-size:12px}}
@media(max-width:620px){.header-row{padding:12px;gap:10px}.brand{font-size:24px}.main-nav{gap:5px}.main-nav a{min-width:0;padding:0 10px;font-size:12px}.ps-home-tools{height:43px;padding-left:10px}.ps-search-icon{width:19px;height:19px}#ps-home-query{font-size:12px}.ps-tool-divider{margin:0 7px}.ps-ai-tutor-button{font-size:11px;height:33px;padding:0 9px}.subject-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px;grid-auto-rows:250px}.subject-card{border-radius:15px}.subject-card .card-copy{padding:8px 26px 8px 10px}.subject-card .card-copy b{font-size:16px}.subject-card .card-copy em{font-size:11px}.subject-card .card-arrow{right:7px;bottom:12px;width:21px;height:21px;font-size:15px}}
@media(max-width:380px){.subject-grid{grid-template-columns:1fr;grid-auto-rows:300px}.subject-card .card-copy b{font-size:19px}}


/* The Pagefind script inserts its own standalone launcher. Retain it for
   click/keyboard functionality, but don't display it next to the search field. */
#polymath-search-launch {display:none !important;}

/* Three complete rows on normal desktop screens without cutting off text. */
@media (min-width:1221px) {
  html, body {height:100%;}
  body {height:100dvh; overflow:hidden;}
  .home-content {flex:1 1 0; min-height:0; overflow:hidden;}
  .subject-grid {
    height:100%; min-height:0;
    padding:clamp(10px,1vw,16px);
    gap:clamp(9px,.85vw,13px);
    grid-template-columns:repeat(5,minmax(0,1fr));
    grid-template-rows:repeat(3,minmax(0,1fr));
  }
  .subject-card {height:100%; min-height:0;}
  .subject-card img {
    flex:1 1 0; height:auto; min-height:0;
    max-height:none; border-radius:17px 17px 10px 10px;
  }
  .subject-card .card-copy {
    flex:0 0 auto; height:clamp(65px,8.8vh,83px); min-height:0;
    padding:6px 34px 7px 13px;
  }
  .subject-card .card-copy b {font-size:clamp(14px,1.23vw,19px);line-height:1.04;}
  .subject-card .card-copy em {font-size:clamp(10px,.86vw,13px);line-height:1.13;margin-top:3px;}
  .subject-card .card-arrow {right:9px;bottom:12px;width:23px;height:23px;font-size:15px;}
}
/* Short displays and narrow viewports scroll instead of hiding the last row. */
@media (max-height:700px) and (min-width:1221px) {
  body {height:auto;min-height:100dvh;overflow-y:auto;}
  .home-content {overflow:visible;}
  .subject-grid {height:auto;grid-template-rows:repeat(3,minmax(208px,1fr));}
}
@media (max-width:1220px) {
  body {height:auto;min-height:100dvh;overflow-y:auto;}
  .home-content {overflow:visible;}
  .subject-grid {height:auto;}
  .subject-card .card-copy {min-height:74px;}
}


.ps-chat-panel{width:min(780px,96vw);height:min(740px,88vh);max-height:88vh;display:flex;flex-direction:column;padding:26px 28px 16px}
.ps-chat-panel h2{margin:9px 0 3px}.ps-chat-panel #ps-tutor-desc{margin:5px 0 14px;font-size:13px}
.ps-chat-tools{display:flex;align-items:center;gap:9px;margin-bottom:12px;color:#bde2ef;font-size:12px;flex-wrap:wrap}
.ps-chat-tools select{border:1px solid #44849a;border-radius:6px;padding:5px 8px;background:#092b43;color:white}
.ps-chat-tools>span{margin-left:auto;color:#84bbcd}
.ps-chat-history{flex:1;min-height:80px;overflow-y:auto;background:#062136;border:1px solid #25516c;border-radius:12px;padding:16px;display:flex;flex-direction:column;gap:14px}
.ps-chat-welcome{background:#0d3855;color:#e8f6fb;border-radius:9px;padding:13px;align-self:flex-start;max-width:88%}
.ps-chat-message{padding:12px 15px;border-radius:12px;max-width:91%;overflow-wrap:anywhere;white-space:normal;font-size:14px;line-height:1.6}
.ps-chat-assistant{background:#0c354f;color:#eff9fc;align-self:flex-start;border:1px solid #2f7185}
.ps-chat-user{background:#195681;color:white;align-self:flex-end}
.ps-chat-line{min-height:1.1em}.ps-chat-line+.ps-chat-line{margin-top:5px}.ps-chat-heading{font-weight:700;font-size:16px}.ps-chat-bullet{padding-left:6px}.ps-chat-blank{height:5px;min-height:5px}
.ps-chat-body code{background:#17465d;padding:1px 3px;border-radius:3px;color:#e3f6fe}
.ps-chat-sources{border-top:1px solid #34718b;margin-top:11px;padding-top:9px;display:flex;flex-direction:column;gap:3px;font-size:12px}
.ps-chat-sources strong{color:#cbecf6}.ps-chat-sources a{color:#63e0ef;text-decoration:underline}
.ps-chat-warning{color:#ffbfac;font-size:12px}
.ps-chat-compose{display:flex;gap:9px;margin-top:12px}
.ps-chat-compose input{flex:1;min-width:0;padding:12px 13px;border:1px solid #4c879a;border-radius:9px;background:#031a2b;color:#fff;font:14px Arial,sans-serif}
.ps-chat-compose button{padding:0 24px;border:0;border-radius:9px;background:#28cbe9;color:#052034;font-weight:700;cursor:pointer}
.ps-chat-compose button:disabled{opacity:.5;cursor:wait}
.ps-chat-disclaimer{font-size:11px!important;color:#9bbbc9!important;margin:8px 0 0!important}
@media(max-width:600px){.ps-chat-panel{width:100%;height:92vh;max-height:92vh;padding:18px 15px 12px}.ps-chat-message{max-width:96%}}

[data-polymath-language]{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap;white-space:nowrap}[data-polymath-language] a[aria-current="true"]{background:#122e61!important;color:#fff!important;text-decoration:none!important;font-weight:700}[data-polymath-language] a{border-radius:999px;padding:6px 12px;display:inline-block}[data-polymath-language] a:focus-visible{outline:2px solid #38a3da;outline-offset:3px}


@media (min-width:1000px) and (min-height:740px) {

    html {
        height:100%;
    }

    body {
        height:100dvh;
        min-height:0;
        overflow:hidden;
    }

    .header-row {
        height:70px;
        min-height:70px;
        flex-wrap:nowrap;
        gap:10px;
        padding:8px 18px;
    }

    .brand {
        font-size:clamp(23px,2vw,32px);
    }

    .brand-separator {
        display:none;
    }

    .ps-home-tools {
        order:0;
        flex:1 1 0;
        min-width:0;
        max-width:none;
        height:43px;
        padding-left:12px;
    }

    #ps-home-query {
        font-size:13px;
    }

    .ps-ai-tutor-button {
        font-size:12px;
        height:33px;
        padding:0 12px;
    }

    .ps-tool-divider {
        margin:0 7px;
    }

    .main-nav {
        gap:6px;
        flex:0 0 auto;
    }

    .main-nav a {
        min-width:0;
        padding:0 12px;
        font-size:12px;
    }

    [data-polymath-language] {
        flex-wrap:nowrap;
        gap:5px;
    }

    [data-polymath-language] a {
        padding:5px 10px;
        font-size:12px;
    }

    .home-content {
        flex:1 1 0;
        min-height:0;
        overflow:hidden;
    }

    .subject-grid {
        height:100%;
        min-height:0;
        grid-template-columns:repeat(5,minmax(0,1fr));
        grid-template-rows:none;
        grid-auto-rows:minmax(0,1fr);
        gap:10px;
        padding:12px;
    }

    .subject-card {
        height:100%;
        min-height:0;
        border-radius:15px;
    }

    .subject-card img {
        flex:1 1 0;
        width:100%;
        height:0;
        min-height:0;
        max-height:none;
        object-fit:cover;
        border-radius:13px 13px 9px 9px;
    }

    .subject-card .card-copy {
        flex:0 0 72px;
        height:72px;
        min-height:0;
        padding:6px 30px 6px 12px;
    }

    .subject-card .card-copy b {
        font-size:clamp(13px,1.17vw,19px);
        line-height:1.08;
    }

    .subject-card .card-copy em {
        font-size:clamp(10px,.88vw,13px);
        line-height:1.15;
        margin-top:3px;
    }

    .subject-card .card-arrow {
        right:7px;
        bottom:10px;
        width:22px;
        height:22px;
        font-size:15px;
    }
}

@media (min-width:1000px) and (max-width:1220px)
       and (min-height:740px) {

    .subject-grid {
        grid-template-columns:repeat(4,minmax(0,1fr));
    }
}



/* Shared institutional header overrides */

html, body {
    height: auto !important;
    min-height: 100vh;
    overflow: visible !important;
}

.site-header {
    padding: 0;
    border: 0;
    text-align: left;
    font-family: Arial, Helvetica, sans-serif;
    color: #092958;
}

.site-header .brand {
    color: #08275b;
}

.site-header .main-nav {
    flex-wrap: wrap;
}

.site-header .main-nav a {
    color: #0b2a55;
}

.site-header .main-nav a[aria-current="page"] {
    background: #062c60;
    color: white;
}

.site-header .ps-home-tools {
    background: white;
}

@media(max-width:999px) {
    .site-header .header-row {
        height: auto;
        flex-wrap: wrap;
    }

    .site-header .main-nav {
        margin-left: 0;
        max-width: 100%;
    }

    .site-header .ps-home-tools {
        order: 3;
        flex-basis: 100%;
    }
}


/* POLYMATH INSTITUTIONAL HEADER BORDER */

.site-header {
    border-top: 3px solid #122e61 !important;
    border-bottom: 2px solid #062650 !important;
    background: #ffffff;
}


/* POLYMATH NAVY PERIMETER */

html, body {
    background: #062650 !important;
}

.site-header {
    background: #ffffff !important;
    border-top: 3px solid #062650 !important;
    border-left: 6px solid #062650 !important;
    border-right: 6px solid #062650 !important;
    border-bottom: 2px solid #062650 !important;
}

.home-content {
    background: #062650 !important;
}


/* POLYMATH UNIFORM PERIMETER */

html, body {
    background: #062650 !important;
}

.site-header {
    background: #ffffff !important;
    border-top: 3px solid #062650 !important;
    border-left: 8px solid #062650 !important;
    border-right: 8px solid #062650 !important;
    border-bottom: 2px solid #062650 !important;
    box-shadow: none !important;
}

.home-content {
    background: #062650 !important;
    padding: 0 !important;
}

.subject-grid {
    background: #062650 !important;
    padding: 8px !important;
    gap: 8px !important;
}


/* POLYMATH ROUNDED INSTITUTIONAL HEADER */

.site-header {
    background: #ffffff !important;
    border: none !important;
    border-radius: 15px !important;
    margin: 8px 8px 0 8px !important;
    box-shadow: none !important;
}

html, body {
    background: #062650 !important;
}


/* POLYMATH NAVIGATION SEPARATOR */

@media (min-width: 1000px) and (min-height: 740px) {
    .site-header .main-nav {
        position: relative;
        margin-left: 12px !important;
        padding-left: 12px;
    }

    .site-header .main-nav::before {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 32px;
        background: #8b9bb2;
    }
}


/* POLYMATH DISTINCT NAVIGATION GROUP */

.site-header .main-nav::before {
    display: none !important;
}

.site-header .main-nav {
    background: #e8edf5 !important;
    border: 1px solid #c4d0e0;
    border-radius: 12px;
    padding: 6px 8px !important;
    margin-left: 8px !important;
}

.site-header .main-nav a {
    background: #ffffff;
}

@media (max-width: 999px) {
    .site-header .main-nav {
        margin-left: 0 !important;
        flex-wrap: wrap;
        max-width: 100%;
    }
}


/* POLYMATH ACTIVE NAVIGATION FIX */

.site-header .main-nav a[aria-current="page"],
.site-header .main-nav a[aria-current="true"] {
    background: #062650 !important;
    color: #ffffff !important;
    border-color: #062650 !important;
}


/* POLYMATH FOLDER TAB NAVIGATION */

.site-header .main-nav {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 4px 0 0 0 !important;
    gap: 4px;
}

.site-header .main-nav > a {
    height: 36px;
    border-radius: 9px 9px 0 0 !important;
    background: #e8edf5 !important;
    color: #062650 !important;
    border: 1px solid #9aadc5 !important;
    border-bottom: 3px solid #9aadc5 !important;
    padding: 0 12px;
}

.site-header .main-nav > a[aria-current="page"] {
    background: #062650 !important;
    color: #ffffff !important;
    border-color: #062650 !important;
}

.site-header .main-nav > a:hover:not([aria-current="page"]) {
    background: #d4dfed !important;
    border-bottom-color: #062650 !important;
}

.site-header [data-polymath-language] {
    margin-left: 8px;
    padding-left: 10px;
    border-left: 1px solid #9aadc5;
}

@media (max-width: 999px) {
    .site-header .main-nav {
        flex-wrap: wrap;
    }

    .site-header .main-nav > a {
        padding: 0 9px;
        height: 34px;
    }
}


/* POLYMATH SOFT BLUE HEADER */

.site-header {
    background: linear-gradient(
        180deg,
        #e9eff7 0%,
        #cfdcec 100%
    ) !important;
}

.site-header .main-nav > a:not([aria-current="page"]) {
    background: #ffffff !important;
    color: #062650 !important;
}

.site-header .ps-home-tools {
    background: #ffffff !important;
}


/* POLYMATH RIGHT-ALIGNED NAVIGATION */

@media (min-width: 1100px) and (min-height: 740px) {

    .site-header .header-row {
        padding-right: 10px !important;
    }

    .site-header .main-nav {
        margin-left: 25px !important;
        flex: 0 0 auto;
    }

    .site-header .ps-home-tools {
        min-width: 0;
    }
}


/* POLYMATH STACKED LANGUAGE SELECTOR */

.site-header .main-nav [data-polymath-language] {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center;
    gap: 3px !important;
    margin-left: 10px;
    padding-left: 12px;
    padding-right: 5px;
    border-left: 1px solid #9aadc5;
}

.site-header .main-nav [data-polymath-language] a {
    background: transparent !important;
    color: #062650 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 1px 0 !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.3;
}

.site-header .main-nav [data-polymath-language]
a[aria-current="true"] {
    background: transparent !important;
    color: #062650 !important;
    font-weight: 700 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

.site-header .main-nav [data-polymath-language] a:hover {
    text-decoration: underline !important;
}

@media (min-width: 1100px) and (min-height: 740px) {
    .site-header .main-nav {
        margin-left: 45px !important;
        flex: 0 0 auto;
    }

    .site-header .header-row {
        padding-right: 10px !important;
    }
}
