/* StudentSOS v17 — compact mobile header, repaired hero bubbles, AI tutor landing pages */

/* Brand lockup: short semantic descriptor under the logo without making the header taller. */
.s17-brand{display:grid!important;grid-template-columns:auto;grid-template-rows:auto auto;align-content:center!important;gap:0!important;line-height:1!important;min-width:0}
.s17-brand>.sos-logo{grid-row:1;min-width:0}
.s17-brand>small{grid-row:2;margin:2px 0 0 49px;color:#7b8494;font:700 9px/1.05 Manrope,Inter,sans-serif!important;letter-spacing:.015em;white-space:nowrap}

/* Slightly tighter public desktop nav now that the tutor section exists. */
@media(min-width:1001px) and (max-width:1220px){
  .s17-header-placeholder{} /* keep selector slot explicit for old caches */
  .s14-header .header-inner{gap:14px!important}
  .s14-header .desktop-nav{gap:15px!important;font-size:13px!important}
  .s14-header .header-actions{gap:8px!important}
  .s14-header .header-actions .btn{padding-left:10px!important;padding-right:10px!important;font-size:12px!important}
}

/* Mobile header: logo + login + menu must always fit on one line. */
@media(max-width:1000px){
  .s14-header .header-inner{height:60px!important;min-height:60px!important;width:calc(100% - 16px)!important;gap:6px!important;padding:0!important}
  .s14-header .s17-brand{flex:0 1 auto!important;max-width:150px!important;min-width:0!important;margin-right:auto!important}
  .s14-header .s17-brand>.sos-logo{gap:6px!important;min-width:0!important}
  .s14-header .s17-brand .sos-logo-mark{width:30px!important;height:30px!important;flex:0 0 30px!important;border-radius:10px!important}
  .s14-header .s17-brand .sos-logo-mark svg{width:26px!important;height:26px!important}
  .s14-header .s17-brand .sos-logo-word{display:flex!important;font-size:14px!important;min-width:0!important}
  .s14-header .s17-brand>small{display:block!important;margin-left:36px!important;margin-top:1px!important;font-size:8px!important;color:#7a8496!important}
  .s14-header .header-actions{gap:5px!important;flex:0 0 auto!important;min-width:0!important}
  .s14-header .s15-header-trial{display:none!important}
  .s14-header .s15-mobile-login{display:inline-flex!important;min-height:38px!important;height:38px!important;padding:0 9px!important;border-radius:11px!important;font-size:12px!important;line-height:1!important}
  .s14-header .s14-mobile-nav-toggle{width:38px!important;height:38px!important;border-radius:11px!important}
  .s14-header .s14-mobile-nav-toggle .sos-icon{width:21px!important;height:21px!important}
  .s14-mobile-nav[open]>.s14-mobile-panel{top:60px!important;height:calc(100dvh - 60px)!important;max-height:calc(100dvh - 60px)!important}
}
@media(max-width:390px){
  .s14-header .s17-brand{max-width:132px!important}
  .s14-header .s17-brand .sos-logo-mark{width:27px!important;height:27px!important;flex-basis:27px!important}
  .s14-header .s17-brand .sos-logo-mark svg{width:23px!important;height:23px!important}
  .s14-header .s17-brand .sos-logo-word{font-size:13px!important}
  .s14-header .s17-brand>small{margin-left:33px!important;font-size:7.5px!important}
  .s14-header .s15-mobile-login{padding:0 7px!important;font-size:11.5px!important}
  .s14-header .s14-mobile-nav-toggle{width:36px!important;height:36px!important}
}
@media(max-width:350px){
  .s14-header .s17-brand{max-width:118px!important}
  .s14-header .s15-mobile-login{padding:0 6px!important;font-size:11px!important}
}

/* Rebuild the phone hero visual as a stable mascot + one rotating phrase. No inherited floating coordinates. */
@media(max-width:620px){
  .s11-seo-hero .s8-mini-hero-inner{overflow:hidden!important}
  .s11-seo-hero .s11-bubble-stage{display:block!important;position:relative!important;min-height:170px!important;height:170px!important;overflow:hidden!important;margin-top:0!important}
  .s11-seo-hero .s11-bubble-stage .sos-mascot{display:block!important;position:absolute!important;left:50%!important;top:8px!important;bottom:auto!important;transform:translateX(-50%)!important;width:92px!important;height:92px!important;opacity:1!important;visibility:visible!important;z-index:2!important}
  .s11-seo-hero .s11-bubble-stage .s11-float-bubble{display:block!important;position:absolute!important;z-index:3!important;left:50%!important;right:auto!important;top:auto!important;bottom:10px!important;width:auto!important;min-width:0!important;max-width:92%!important;margin:0!important;padding:8px 11px!important;white-space:normal!important;text-align:center!important;font-size:12px!important;line-height:1.28!important;transform:translateX(-50%)!important;opacity:0;pointer-events:none!important;animation:s17HeroPhrase 15s linear infinite!important;box-shadow:0 9px 22px rgba(31,50,82,.10)!important}
  .s11-seo-hero .s11-bubble-stage .s11-float-bubble.b1{animation-delay:0s!important}
  .s11-seo-hero .s11-bubble-stage .s11-float-bubble.b2{animation-delay:3s!important}
  .s11-seo-hero .s11-bubble-stage .s11-float-bubble.b3{animation-delay:6s!important}
  .s11-seo-hero .s11-bubble-stage .s11-float-bubble.b4{animation-delay:9s!important}
  .s11-seo-hero .s11-bubble-stage .s11-float-bubble.b5{animation-delay:12s!important}
}
@keyframes s17HeroPhrase{0%,2%{opacity:0}5%,17%{opacity:1}19%,100%{opacity:0}}
@media(max-width:620px) and (prefers-reduced-motion:reduce){
  .s11-seo-hero .s11-bubble-stage .s11-float-bubble{display:none!important;animation:none!important}
  .s11-seo-hero .s11-bubble-stage .s11-float-bubble.b1{display:block!important;opacity:1!important}
}

/* Homepage tutor block: important, but intentionally below the main product section. */
.s17-home-tutor{padding:34px 0 78px;background:#fff}
.s17-home-tutor>.shell{display:grid;grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr);gap:18px;align-items:stretch}
.s17-home-tutor-copy{padding:30px;border-radius:24px;background:linear-gradient(145deg,#172033,#24365b);color:#fff;display:flex;flex-direction:column;align-items:flex-start}
.s17-home-tutor-copy>span,.s17-kicker,.s17-section-head>span{font-size:11px;font-weight:900;letter-spacing:.13em;color:#6aa0ff}
.s17-home-tutor-copy h2{margin:12px 0 14px;font-size:34px;line-height:1.07;letter-spacing:-.045em}
.s17-home-tutor-copy p{margin:0;color:#cbd4e4;font-size:15px;line-height:1.65}
.s17-home-tutor-copy a{margin-top:auto;padding-top:22px;color:#fff;font-weight:850;text-decoration:none}
.s17-home-tutor-subjects{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.s17-home-tutor-subjects a{display:flex;flex-direction:column;justify-content:center;min-height:108px;padding:18px;border:1px solid #e1e7ef;border-radius:19px;background:#fff;color:#27334a;text-decoration:none;transition:.18s transform,.18s border-color,.18s box-shadow}
.s17-home-tutor-subjects a:hover{transform:translateY(-2px);border-color:#cbdcff;box-shadow:0 12px 28px rgba(30,60,110,.07)}
.s17-home-tutor-subjects b{font-size:17px}.s17-home-tutor-subjects span{margin-top:3px;color:#7b8597;font-size:12px}

/* AI tutor hub and subject pages. */
.s17-tutor{background:#fff;color:#172033}.s17-tutor .shell{max-width:1120px}
.s17-tutor-hero{padding:54px 0 58px;background:linear-gradient(180deg,#f5f8ff 0%,#fff 100%)}
.s17-tutor-hero-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(280px,.52fr);gap:48px;align-items:center}
.s17-crumb{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:22px;color:#7d8798;font-size:12px}.s17-crumb a{color:#1769ff;text-decoration:none}
.s17-tutor-hero h1{max-width:810px;margin:10px 0 18px;font-size:clamp(42px,5.7vw,68px);line-height:1.02;letter-spacing:-.058em}
.s17-tutor-hero p{max-width:760px;margin:0;color:#667085;font-size:18px;line-height:1.65}
.s17-tutor-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:25px}
.s17-tutor-mascot{min-height:300px;padding:27px;border:1px solid #dfe7f4;border-radius:28px;background:#fff;box-shadow:0 18px 46px rgba(34,59,102,.08);display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}
.s17-tutor-mascot .sos-mascot{width:118px;height:118px;filter:drop-shadow(0 18px 24px rgba(23,105,255,.15))}.s17-tutor-mascot b{margin-top:13px;font-size:21px}.s17-tutor-mascot span{margin-top:7px;color:#718096;font-size:13px;line-height:1.5}
.s17-tutor-subjects,.s17-tutor-topics,.s17-tutor-faq,.s17-related{padding:72px 0}.s17-tutor-how{padding:72px 0;background:#f7f9fc}.s17-tutor-seo{padding:64px 0 78px;background:#fff}
.s17-section-head{max-width:760px;margin-bottom:28px}.s17-section-head h2{margin:8px 0 10px;font-size:38px;line-height:1.08;letter-spacing:-.045em}.s17-section-head p{margin:0;color:#707b8e;font-size:16px;line-height:1.6}
.s17-subject-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.s17-subject-grid>a{display:grid;grid-template-columns:42px minmax(0,1fr) 18px;gap:11px;align-items:center;min-height:92px;padding:16px;border:1px solid #e1e7ef;border-radius:18px;background:#fff;color:#263247;text-decoration:none;transition:.18s transform,.18s border-color,.18s box-shadow}
.s17-subject-grid>a:hover{transform:translateY(-2px);border-color:#c7d9ff;box-shadow:0 12px 30px rgba(32,62,110,.07)}
.s17-subject-grid i{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#edf4ff;color:#1769ff;font-style:normal}.s17-subject-grid i .sos-icon{width:20px}.s17-subject-grid div{display:grid;min-width:0}.s17-subject-grid b{font-size:16px}.s17-subject-grid span{margin-top:3px;color:#798497;font-size:11px;line-height:1.35}.s17-subject-grid em{font-style:normal;color:#a0a8b6;font-size:18px}
.s17-how-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.s17-how-grid article{padding:24px;border:1px solid #e1e7ef;border-radius:20px;background:#fff}.s17-how-grid article>b{display:grid;place-items:center;width:35px;height:35px;border-radius:11px;background:#edf4ff;color:#1769ff;font-size:12px}.s17-how-grid h3{margin:16px 0 8px;font-size:19px}.s17-how-grid p{margin:0;color:#6e798b;font-size:14px;line-height:1.6}
.s17-tutor-seo .shell{max-width:900px}.s17-tutor-seo h2{font-size:34px;letter-spacing:-.04em}.s17-tutor-seo p{color:#5f6b7e;font-size:16px;line-height:1.78}
.s17-tutor-start{padding:60px 0 70px}.s17-tutor-start-grid{display:grid;grid-template-columns:minmax(0,.78fr) minmax(0,1.22fr);gap:28px;align-items:start}.s17-tutor-start h2{margin:9px 0 12px;font-size:38px;line-height:1.08;letter-spacing:-.045em}.s17-tutor-start p{color:#667085;line-height:1.65}.s17-example-list{display:flex;flex-wrap:wrap;gap:7px;margin-top:19px}.s17-example-list button{border:1px solid #dce5f2;border-radius:999px;background:#fff;padding:8px 10px;color:#43516a;font-size:11px;font-weight:750;cursor:pointer;text-align:left}.s17-example-list button:hover{border-color:#aac6ff;color:#155bd8}
.s17-tutor-composer{padding:18px;border:1px solid #dfe5ee;border-radius:22px;background:#fff;box-shadow:0 16px 40px rgba(24,49,88,.06)}.s17-tutor-composer form{display:grid;gap:11px}.s17-tutor-composer textarea{width:100%;min-height:190px;resize:vertical;border:1px solid #e0e5ed;border-radius:16px;background:#fbfcfe;padding:16px;outline:none;font:500 16px/1.55 Manrope,sans-serif;color:#1e293b}.s17-tutor-composer textarea:focus{border-color:#8bb3ff;box-shadow:0 0 0 3px rgba(23,105,255,.08)}.s17-tutor-composer textarea::placeholder{color:#98a2b3}.s17-tutor-composer .send-btn{justify-content:center;min-height:50px;background:#1769ff;border-radius:14px}.s17-tutor-composer>small{display:block;margin-top:11px;color:#8a94a5;font-size:11px!important}.s17-tutor-composer .preview-result{margin-top:12px}
.s17-topic-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.s17-topic-grid article{min-height:142px;padding:19px;border:1px solid #e2e7ef;border-radius:19px;background:#fff}.s17-topic-grid .sos-icon{width:23px;color:#1769ff}.s17-topic-grid b{display:block;margin:14px 0 6px;font-size:16px}.s17-topic-grid span{color:#7b8597;font-size:12px;line-height:1.5}
.s17-faq-list{display:grid;gap:9px}.s17-faq-list details{border:1px solid #e1e7ef;border-radius:17px;background:#fff;overflow:hidden}.s17-faq-list summary{list-style:none;display:flex;justify-content:space-between;gap:16px;align-items:center;padding:17px 19px;font-weight:850;cursor:pointer}.s17-faq-list summary::-webkit-details-marker{display:none}.s17-faq-list summary span{color:#1769ff;font-size:22px;transition:.15s transform}.s17-faq-list details[open] summary span{transform:rotate(45deg)}.s17-faq-list p{margin:0;padding:0 19px 18px;color:#667085;line-height:1.65}
.s17-related-links{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.s17-related-links a{display:flex;justify-content:space-between;gap:8px;padding:14px;border:1px solid #e1e7ef;border-radius:14px;color:#344054;font-size:13px;font-weight:800;text-decoration:none}.s17-related-links a span{color:#1769ff}

@media(max-width:900px){
  .s17-home-tutor>.shell,.s17-tutor-hero-grid,.s17-tutor-start-grid{grid-template-columns:1fr}
  .s17-home-tutor-copy a{margin-top:20px}.s17-tutor-mascot{min-height:220px}
  .s17-subject-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.s17-related-links{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:620px){
  .s17-home-tutor{padding:20px 0 56px}.s17-home-tutor>.shell{gap:10px}.s17-home-tutor-copy{padding:22px;border-radius:20px}.s17-home-tutor-copy h2{font-size:29px}.s17-home-tutor-subjects{grid-template-columns:1fr 1fr;gap:7px}.s17-home-tutor-subjects a{min-height:82px;padding:13px;border-radius:15px}.s17-home-tutor-subjects b{font-size:14px}.s17-home-tutor-subjects span{font-size:10px}
  .s17-tutor-hero{padding:28px 0 42px}.s17-tutor-hero h1{font-size:37px}.s17-tutor-hero p{font-size:16px}.s17-tutor-mascot{display:none}.s17-tutor-actions{display:grid;grid-template-columns:1fr 1fr}.s17-tutor-actions .btn{padding:12px 10px;font-size:13px}
  .s17-tutor-subjects,.s17-tutor-topics,.s17-tutor-faq,.s17-related,.s17-tutor-how{padding:52px 0}.s17-tutor-start{padding:46px 0 54px}.s17-section-head h2,.s17-tutor-start h2{font-size:31px}.s17-subject-grid{grid-template-columns:1fr}.s17-how-grid,.s17-topic-grid{grid-template-columns:1fr}.s17-related-links{grid-template-columns:1fr 1fr}.s17-tutor-composer{padding:13px;border-radius:18px}.s17-tutor-composer textarea{min-height:160px;font-size:16px}.s17-example-list{display:grid}.s17-example-list button{border-radius:13px;padding:10px 11px}
}
