/* StudentSOS v20.2 — product polish, conversion and retention */

/* Header: never overlap. Use compact More before links collide. */
.s202-more-tutor{display:none!important}
@media(min-width:1221px){
  .site-header .header-inner{display:flex!important;align-items:center!important;min-width:0}
  .desktop-nav.s6-nav{overflow:visible!important}
}
@media(min-width:1041px) and (max-width:1220px){
  .s202-nav-tutor{display:none!important}.s202-more-tutor{display:block!important}
  .desktop-nav.s6-nav{gap:2px!important}
}
@media(min-width:721px) and (max-width:1040px){
  .desktop-nav.s6-nav{display:none!important}
  .s14-mobile-nav{display:block!important}
  .header-actions{margin-left:auto!important}
}
@media(max-width:720px){.s202-more-tutor{display:block!important}}

/* Dashboard composer: one visual system, no random font sizing. */
.s20-app-composer{padding:15px!important}
.s20-app-composer .s2-app-composer-top{min-height:28px;align-items:center!important;margin-bottom:10px!important}
.s20-dashboard-chat{display:grid!important;grid-template-columns:minmax(0,1fr) 44px!important;gap:8px!important;align-items:end!important;padding:8px!important;border:1px solid #dce4ef!important;border-radius:16px!important;background:#fff!important}
.s20-dashboard-chat textarea{width:100%!important;min-height:54px!important;max-height:150px!important;padding:10px 6px!important;border:0!important;outline:0!important;resize:none!important;background:transparent!important;font:500 14px/1.5 Manrope,system-ui,sans-serif!important;color:#172033!important}
.s20-dashboard-chat button[type=submit]{width:40px!important;height:40px!important;min-width:40px!important;border-radius:12px!important;align-self:end!important}
.s2-app-quick.s7-app-quick{display:flex!important;align-items:center!important;gap:7px!important;flex-wrap:wrap!important;margin-top:8px!important}
.s2-app-quick.s7-app-quick>a,.s2-app-quick.s7-app-quick>button{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;height:36px!important;min-height:36px!important;padding:0 11px!important;border-radius:10px!important;font:750 12px/1 Manrope,system-ui,sans-serif!important;letter-spacing:0!important;white-space:nowrap!important}
.s2-app-quick.s7-app-quick svg{width:15px!important;height:15px!important;flex:0 0 15px!important}
.s202-dashboard-status{display:flex;align-items:center;gap:8px;padding:9px 11px;margin:8px 0 0;border-radius:11px;background:#f2f7ff;color:#31527e;font-size:11px;font-weight:700}.s202-dashboard-status i{width:8px;height:8px;border-radius:50%;background:#1769ff;animation:s202pulse 1s infinite alternate}
@keyframes s202pulse{to{opacity:.3;transform:scale(.75)}}

/* Guest AI: immediate visible work state and deliberate sign-up continuation gate. */
.preview-result .s202-preview-thinking{display:flex;align-items:center;gap:12px;padding:15px 16px;border:1px solid #dce7f7;border-radius:15px;background:linear-gradient(135deg,#f4f8ff,#fff);color:#29405f}
.s202-preview-spinner{width:22px;height:22px;border:3px solid #d6e4fa;border-top-color:#1769ff;border-radius:50%;animation:s202spin .8s linear infinite;flex:0 0 auto}@keyframes s202spin{to{transform:rotate(360deg)}}
.s202-preview-thinking div{display:grid;gap:2px}.s202-preview-thinking b{font-size:13px}.s202-preview-thinking small{font-size:10px;color:#78859a}
.s202-preview-gate{position:relative;margin-top:-72px;padding-top:90px;background:linear-gradient(180deg,rgba(255,255,255,0),#fff 47%)}
.s202-preview-gate-card{padding:18px;border:1px solid #c9dcfb;border-radius:18px;background:linear-gradient(135deg,#eef5ff,#fff);box-shadow:0 14px 35px rgba(36,80,145,.08)}
.s202-preview-gate-card small{display:block;color:#1769ff;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}.s202-preview-gate-card b{display:block;margin:5px 0;font-size:18px;color:#172033}.s202-preview-gate-card p{margin:0 0 12px!important;color:#647188;font-size:12px;line-height:1.5}.s202-preview-gate-card a{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:0 15px;border-radius:11px;background:#1769ff;color:#fff!important;text-decoration:none!important;font-size:12px;font-weight:850}
.s202-doc-lock{font-size:9px!important;color:#7d8797!important;margin-left:3px}

/* Project chat: bottom composer is physically stable. */
body.s18-product-app .s18-chat-shell{display:flex!important;flex-direction:column!important;min-height:0!important}
body.s18-product-app .s18-chat-stream{flex:1 1 0!important;min-height:0!important;overflow-y:auto!important}
body.s18-product-app .s18-composer-wrap{position:sticky!important;bottom:0!important;left:0!important;right:0!important;flex:0 0 auto!important;margin:0!important;background:#fff!important;box-shadow:0 -10px 30px rgba(24,36,56,.045)!important}
body.s18-product-app .s18-composer{max-width:none!important}
@media(max-width:720px){
 body.s18-product-app{padding-top:64px!important;padding-bottom:72px!important;overflow:hidden!important}
 body.s18-product-app .s18-project{height:calc(100dvh - 136px)!important;min-height:0!important}
 body.s18-product-app .s18-chat-shell{height:100%!important;max-height:100%!important}
 body.s18-product-app .s18-composer-wrap{position:sticky!important;bottom:0!important;padding-bottom:max(8px,env(safe-area-inset-bottom))!important}
}

/* Subscription management: cancellation stays deep, retention modal looks deliberate. */
.s202-subscription-manage{margin-top:18px;border-top:1px solid #edf0f4;padding-top:12px}.s202-subscription-manage>summary{cursor:pointer;color:#7a8597;font-size:11px;font-weight:700;list-style:none}.s202-subscription-manage>summary::-webkit-details-marker{display:none}.s202-subscription-manage>div{padding-top:12px}.s202-open-cancel{border:0;background:none;color:#8b5060;text-decoration:underline;text-underline-offset:3px;font-size:11px;cursor:pointer;padding:4px 0}
.s202-cancel-modal[hidden]{display:none!important}.s202-cancel-modal{position:fixed;inset:0;z-index:200;display:grid;place-items:center;padding:18px}.s202-cancel-bg{position:absolute;inset:0;background:rgba(14,22,35,.62);backdrop-filter:blur(4px)}.s202-cancel-card{position:relative;width:min(520px,100%);border-radius:22px;background:#fff;padding:24px;box-shadow:0 28px 80px rgba(0,0,0,.22)}.s202-cancel-card h2{margin:5px 0 8px;font-size:25px;letter-spacing:-.03em}.s202-cancel-card p{font-size:13px;color:#68758a;line-height:1.55}.s202-retention-offer{padding:15px;margin:16px 0;border:1px solid #c9ddfb;border-radius:15px;background:#f1f7ff}.s202-retention-offer b{display:block;font-size:16px;color:#17355f}.s202-retention-offer small{display:block;margin-top:4px;color:#61728a;line-height:1.45}.s202-cancel-actions{display:flex;gap:8px;flex-wrap:wrap}.s202-cancel-actions button{min-height:40px;padding:0 13px;border-radius:10px;font-weight:800;cursor:pointer}.accept-retention{border:0;background:#1769ff;color:#fff}.s202-show-cancel{border:1px solid #dce2ea;background:#fff;color:#5e6a7d}.s202-cancel-final{margin-top:14px;padding-top:14px;border-top:1px solid #edf0f4}.cancel-sub-final{border:0;background:none!important;color:#aa3d50!important;padding:8px 0!important;text-decoration:underline;font-size:11px}

/* Admin: give cards/fields breathing room and avoid horizontal collisions. */
.admin-v6-main,.admin-v6-content{min-width:0!important;overflow-x:hidden!important}.admin-v6-grid,.admin-v6-settings-grid{align-items:start!important}.admin-v6-card{min-width:0!important;padding:18px!important}.admin-v6-card label{display:grid!important;gap:6px!important;margin:0 0 12px!important;font-size:11px!important;font-weight:750!important;color:#536075!important}.admin-v6-card input,.admin-v6-card select,.admin-v6-card textarea{width:100%!important;min-width:0!important;box-sizing:border-box!important}.s202-provider-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0}.s202-provider-checks label{display:flex!important;align-items:center!important;gap:7px!important;margin:0!important;padding:9px;border:1px solid #e1e6ed;border-radius:10px;background:#fff}.s202-provider-checks input{width:auto!important}.s202-payment-note{padding:9px 10px;border-radius:10px;background:#f6f8fb;color:#6d788a;font-size:10px;line-height:1.45}
@media(max-width:1000px){.admin-v6-grid,.admin-v6-settings-grid{grid-template-columns:1fr!important}.admin-v6-sidebar{width:210px!important}}
@media(max-width:720px){.admin-v6-layout{display:block!important}.admin-v6-sidebar{width:auto!important;position:relative!important}.s202-provider-checks{grid-template-columns:1fr}}

/* Cleaner tables everywhere in AI output. */
.s18-message .sos-table-wrap,.preview-result .sos-table-wrap,.s20-share-message .sos-table-wrap{box-shadow:0 4px 18px rgba(28,44,68,.04)}
@media(max-width:600px){.sos-ai-table{min-width:430px!important;font-size:12px!important}.sos-ai-table th,.sos-ai-table td{padding:9px 10px!important}}
