/* StudentsMarketHub original PDF workspace design */
.smh-pdf-app{max-width:1220px;margin:20px auto;padding:0 18px;color:#17243a;font-family:inherit}.smh-pdf-app *{box-sizing:border-box}
.smh-pdf-topbar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 4px 20px}.smh-pdf-brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:#17344d}.smh-pdf-brand-mark{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#e8f4f6;color:#08728a;font-size:25px}.smh-pdf-brand b{display:block;font-size:17px}.smh-pdf-brand small{display:block;color:#718096;font-size:11px}.smh-pdf-topbar nav{display:flex;gap:22px;flex-wrap:wrap}.smh-pdf-topbar nav a{font-size:13px;font-weight:700;text-decoration:none;color:#43536a}
.smh-pdf-hero{display:grid;grid-template-columns:1.05fr .95fr;gap:28px;align-items:center;padding:42px;background:linear-gradient(120deg,#10314f,#146e83);border-radius:22px;color:#fff}.smh-pdf-hero-copy h1{font-size:clamp(34px,5vw,52px);line-height:1.1;color:#fff;margin:12px 0}.smh-pdf-hero-copy p{font-size:17px;line-height:1.65;color:#e4f2f6;max-width:570px}.smh-pdf-kicker{font-size:10px;letter-spacing:1.5px;font-weight:900;color:#16819a}.smh-pdf-hero .smh-pdf-kicker{color:#bce7ed}.smh-pdf-hero-points{display:flex;gap:10px 18px;flex-wrap:wrap;margin-top:22px;font-size:12px;color:#e2f4f6}.smh-pdf-upload-card{background:#fff;color:#17243a;border-radius:18px;padding:25px;text-align:center;box-shadow:0 14px 40px #001a2d30}.smh-pdf-upload-symbol{margin:0 auto 10px;width:48px;height:48px;border-radius:15px;display:grid;place-items:center;background:#eaf5f7;color:#08728a;font-size:29px}.smh-pdf-upload-card h2{font-size:22px;margin:5px 0}.smh-pdf-upload-card p{font-size:13px;color:#6b7a8c}.smh-pdf-upload{display:flex;flex-direction:column;align-items:center;gap:8px;padding:18px;border:2px dashed #9dcbd4;border-radius:13px;background:#f7fbfc;cursor:pointer;color:#15566b}.smh-pdf-upload strong{background:#08758a;color:#fff;padding:11px 22px;border-radius:8px;font-size:13px}.smh-pdf-upload span{font-size:11px;color:#718096}.smh-pdf-upload input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.smh-pdf-upload.drag{background:#e7f6f8;border-color:#08758a}.smh-pdf-file-name{font-size:12px;color:#66758a;margin-top:10px;overflow-wrap:anywhere}
.smh-pdf-notice{margin:16px 0;padding:12px 15px;border-radius:10px;background:#edf7f2;color:#155b3a;font-size:13px}.smh-pdf-notice.is-error{background:#fff0ee;color:#a12b22}
.smh-pdf-tool-section{padding:24px 0 30px}.smh-pdf-section-heading h2,.smh-pdf-how h2{font-size:27px;margin:6px 0;color:#17243a}.smh-pdf-section-heading p{margin:0;color:#6b7a8c;font-size:14px}.smh-pdf-tools-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-top:20px}.smh-pdf-tool{background:#fff;border:1px solid #e0e8ee;border-radius:13px;padding:17px 10px;display:flex;flex-direction:column;align-items:center;gap:7px;color:#17243a;cursor:pointer;min-width:0;box-shadow:0 3px 10px #0c31400a;transition:.18s}.smh-pdf-tool:hover,.smh-pdf-tool.active{border-color:#16839a;box-shadow:0 0 0 2px #16839a18;transform:translateY(-2px)}.smh-pdf-tool>span{font-size:26px;color:#08758a}.smh-pdf-tool b{font-size:13px}.smh-pdf-tool small{font-size:11px;color:#718096;text-align:center}
.smh-pdf-workspace{background:#fff;border:1px solid #e0e8ee;border-radius:18px;padding:24px;box-shadow:0 10px 32px #16394d0b;scroll-margin-top:20px}.smh-pdf-workspace-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.smh-pdf-workspace-head h2{margin:5px 0;font-size:27px;color:#17243a}.smh-pdf-workspace-head p{margin:0;color:#6b7a8c;font-size:13px}.smh-pdf-page-count{font-size:12px;color:#53657b;background:#f0f5f8;padding:8px 12px;border-radius:30px;white-space:nowrap}.smh-pdf-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin:20px 0}.smh-pdf-actions label,.smh-pdf-audio label,.smh-pdf-operation label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:800;color:#475569}.smh-pdf-actions select,.smh-pdf-audio select,.smh-pdf-operation input{border:1px solid #cbd5e1;border-radius:8px;padding:10px;background:#fff;color:#172033;min-width:150px}.smh-pdf-primary,.smh-pdf-secondary,.smh-pdf-page-nav button,.smh-pdf-audio button{border:0;border-radius:8px;padding:11px 15px;font-weight:800;cursor:pointer;font-size:12px}.smh-pdf-primary{background:#08758a;color:#fff}.smh-pdf-secondary{background:#eaf4f6;color:#15566b}.smh-pdf-reader{display:grid;grid-template-columns:1fr 1fr;gap:16px}.smh-pdf-original,.smh-pdf-explanation{min-width:0;border:1px solid #e0e8ee;border-radius:12px;padding:16px;background:#fbfdfe}.smh-pdf-subhead{font-size:13px;font-weight:900;margin-bottom:12px;color:#344256}.smh-pdf-original canvas{display:block;max-width:100%;height:auto;margin:0 auto;background:#fff;box-shadow:0 2px 12px #00000012}.smh-pdf-page-nav{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:12px;font-size:12px;color:#65758a}.smh-pdf-page-nav button,.smh-pdf-audio button{background:#eaf1f5;color:#234256}.smh-pdf-page-nav button:disabled,.smh-pdf-audio button:disabled{opacity:.4;cursor:not-allowed}.smh-pdf-output{white-space:pre-wrap;line-height:1.75;font-size:14px;min-height:230px;max-height:600px;overflow:auto;color:#334155}.smh-pdf-audio{display:flex;gap:8px;align-items:end;flex-wrap:wrap;border-top:1px solid #e2e8f0;padding-top:12px}.smh-pdf-operation{margin-top:16px;padding:16px;background:#f7fafc;border:1px solid #e2e8f0;border-radius:12px}.smh-pdf-operation p{margin-top:0}.smh-pdf-operation input[type=file]{display:block;margin:10px 0}
.smh-pdf-how{padding:34px 4px;text-align:center}.smh-pdf-how-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:22px;text-align:left}.smh-pdf-how-grid article{border:1px solid #e0e8ee;border-radius:13px;padding:20px}.smh-pdf-how-grid i{display:grid;place-items:center;width:30px;height:30px;background:#e8f4f6;color:#08758a;border-radius:50%;font-style:normal;font-weight:900}.smh-pdf-how-grid b{display:block;margin:12px 0 5px}.smh-pdf-how-grid p{font-size:13px;color:#718096;margin:0;line-height:1.6}.smh-pdf-footer{display:flex;flex-direction:column;align-items:center;gap:6px;padding:22px;border-top:1px solid #e5ebef;text-align:center;color:#526276}.smh-pdf-footer b{color:#17344d}.smh-pdf-footer span{font-size:13px}.smh-pdf-footer small{max-width:760px;font-size:11px;line-height:1.6;color:#8793a2}
@media(max-width:900px){.smh-pdf-tools-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.smh-pdf-hero{grid-template-columns:1fr;padding:30px}.smh-pdf-topbar nav{gap:12px}}
@media(max-width:640px){.smh-pdf-app{padding:0 10px}.smh-pdf-topbar{align-items:flex-start;flex-direction:column}.smh-pdf-topbar nav{font-size:12px}.smh-pdf-hero{padding:24px 16px}.smh-pdf-hero-copy h1{font-size:34px}.smh-pdf-tools-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.smh-pdf-reader{grid-template-columns:1fr}.smh-pdf-workspace{padding:14px}.smh-pdf-workspace-head{align-items:flex-start;flex-direction:column}.smh-pdf-actions{align-items:stretch}.smh-pdf-actions label{flex:1;min-width:130px}.smh-pdf-actions button{width:100%}.smh-pdf-output{min-height:160px}.smh-pdf-how-grid{grid-template-columns:1fr}}

.smh-pdf-app [hidden]{display:none!important}

.smh-pdf-seo-content{max-width:920px;margin:12px auto 30px;padding:28px 24px;border:1px solid #e3eaf0;border-radius:16px;background:#fff;color:#334155;line-height:1.75}
.smh-pdf-seo-content h2{font-size:27px;line-height:1.25;color:#17243a;margin:8px 0 12px}
.smh-pdf-seo-content h3{font-size:19px;color:#173b52;margin:24px 0 8px}
.smh-pdf-seo-content p,.smh-pdf-seo-content li{font-size:14px}
.smh-pdf-seo-content ul{padding-left:22px}
.smh-pdf-faq details{border-top:1px solid #e4ebf0;padding:13px 0}
.smh-pdf-faq summary{cursor:pointer;font-weight:800;color:#173b52}
.smh-pdf-faq details p{margin:9px 0 0}

/* Polished tool-card interactions and motion */
.smh-pdf-tools-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}
.smh-pdf-tool{position:relative;overflow:hidden;min-height:126px;transition:transform .24s ease,box-shadow .24s ease,border-color .24s ease;background:linear-gradient(145deg,#fff,#f8fcfd)}
.smh-pdf-tool:before{content:"";position:absolute;inset:0;background:linear-gradient(110deg,transparent 20%,rgba(15,132,157,.09) 45%,transparent 70%);transform:translateX(-130%);transition:transform .55s ease}
.smh-pdf-tool:hover:before{transform:translateX(130%)}
.smh-pdf-tool:hover{transform:translateY(-6px) scale(1.015);box-shadow:0 14px 28px rgba(13,91,112,.13);border-color:#69b7c4}
.smh-pdf-tool:focus-visible{outline:3px solid #2a9bb0;outline-offset:3px}
.smh-pdf-tool>span{display:grid;place-items:center;width:43px;height:43px;border-radius:13px;background:#e8f5f7;color:#08758a;font-size:25px;transition:transform .25s ease,background .25s ease}
.smh-pdf-tool:hover>span{transform:rotate(-7deg) scale(1.12);background:#d8eff2}
.smh-pdf-tool[data-tool="tutor"]{background:linear-gradient(135deg,#f1fbff,#eef6ff);border-color:#9bcbd7}
.smh-pdf-tool[data-tool="tutor"]>span{background:#d8edf5;color:#075e80}
.smh-pdf-upload-card{animation:smhFloat 5s ease-in-out infinite}
.smh-pdf-upload-card:hover{box-shadow:0 20px 48px #001a2d38}
.smh-pdf-primary,.smh-pdf-secondary{transition:transform .2s ease,box-shadow .2s ease,filter .2s ease}
.smh-pdf-primary:hover,.smh-pdf-secondary:hover{transform:translateY(-2px);box-shadow:0 7px 16px #0b53652a;filter:brightness(1.04)}
.smh-pdf-feature-note{padding:12px 14px;border-radius:10px;background:#fff7e8;color:#875a12}
@keyframes smhFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
@media(max-width:900px){.smh-pdf-tools-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){.smh-pdf-tools-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.smh-pdf-tool{min-height:115px;padding:14px 8px}}
@media(prefers-reduced-motion:reduce){.smh-pdf-tool,.smh-pdf-tool:before,.smh-pdf-upload-card,.smh-pdf-primary,.smh-pdf-secondary{animation:none!important;transition:none!important}}

/* v2.4.1 visual clarity update */
#smh-pdf-app .smh-pdf-tools-grid{
 display:grid!important;
 grid-template-columns:repeat(4,minmax(0,1fr))!important;
 gap:18px!important;
 margin-top:24px!important;
 align-items:stretch;
}
#smh-pdf-app .smh-pdf-tool{
 width:100%!important;
 min-height:158px!important;
 padding:20px 14px!important;
 display:flex!important;
 flex-direction:column!important;
 justify-content:center!important;
 align-items:center!important;
 gap:10px!important;
 border:1px solid #d8e3ec!important;
 border-radius:18px!important;
 background:linear-gradient(145deg,#ffffff 0%,#f5fafc 100%)!important;
 color:#132d46!important;
 box-shadow:0 5px 14px rgba(20,52,78,.07)!important;
 text-align:center!important;
 position:relative;
 isolation:isolate;
}
#smh-pdf-app .smh-pdf-tool>span{
 width:54px!important;height:54px!important;
 display:grid!important;place-items:center!important;
 border-radius:16px!important;
 background:#e5f3f6!important;
 color:#08758a!important;
 font-size:29px!important;line-height:1!important;
 box-shadow:inset 0 0 0 1px rgba(8,117,138,.08);
}
#smh-pdf-app .smh-pdf-tool b{
 display:block!important;
 color:#132d46!important;
 font-size:16px!important;
 font-weight:800!important;
 line-height:1.25!important;
}
#smh-pdf-app .smh-pdf-tool small{
 display:block!important;
 color:#52677d!important;
 font-size:13px!important;
 line-height:1.4!important;
}
#smh-pdf-app .smh-pdf-tool:hover{
 transform:translateY(-5px)!important;
 border-color:#5aa9ba!important;
 background:#f0fafb!important;
 box-shadow:0 14px 28px rgba(12,93,115,.15)!important;
}
#smh-pdf-app .smh-pdf-tool.active,
#smh-pdf-app .smh-pdf-tool[aria-pressed="true"]{
 background:linear-gradient(135deg,#075985 0%,#087f9b 100%)!important;
 border:2px solid #075985!important;
 box-shadow:0 12px 26px rgba(7,89,133,.25)!important;
 transform:translateY(-3px)!important;
}
#smh-pdf-app .smh-pdf-tool.active>span,
#smh-pdf-app .smh-pdf-tool[aria-pressed="true"]>span{
 background:rgba(255,255,255,.17)!important;
 color:#fff!important;
 box-shadow:inset 0 0 0 1px rgba(255,255,255,.25)!important;
}
#smh-pdf-app .smh-pdf-tool.active b,
#smh-pdf-app .smh-pdf-tool[aria-pressed="true"] b,
#smh-pdf-app .smh-pdf-tool.active small,
#smh-pdf-app .smh-pdf-tool[aria-pressed="true"] small{
 color:#fff!important;
}
#smh-pdf-app .smh-pdf-tool[data-tool="tutor"]{
 border-color:#a6d7df!important;
 background:linear-gradient(145deg,#effbff,#e8f5ff)!important;
}
#smh-pdf-app .smh-pdf-tool[data-tool="tutor"]>span{background:#d7eff4!important}
#smh-pdf-app .smh-pdf-tool[data-tool="tutor"].active{
 background:linear-gradient(135deg,#173b70,#087f9b)!important;
}
#smh-pdf-app .smh-pdf-tool:focus-visible{
 outline:3px solid #f0a52b!important;outline-offset:3px!important;
}
@media(max-width:1050px){
 #smh-pdf-app .smh-pdf-tools-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important}
}
@media(max-width:640px){
 #smh-pdf-app .smh-pdf-tools-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 #smh-pdf-app .smh-pdf-tool{min-height:142px!important;padding:15px 9px!important;border-radius:14px!important}
 #smh-pdf-app .smh-pdf-tool>span{width:46px!important;height:46px!important;font-size:25px!important}
 #smh-pdf-app .smh-pdf-tool b{font-size:14px!important}
 #smh-pdf-app .smh-pdf-tool small{font-size:11px!important}
}

/* Standalone PDF Tools mode: keep AI Tutor UI exclusively in its own plugin. */
#smh-pdf-app #smh-ai-tutor .smh-pdf-workspace-head .smh-pdf-kicker,
#smh-pdf-app #smh-ai-tutor .smh-pdf-workspace-head p,
#smh-pdf-app #smh-pdf-actions,
#smh-pdf-app #smh-ai-tutor .smh-pdf-reader {display:none!important}
#smh-pdf-app #smh-ai-tutor .smh-pdf-workspace-head h2{font-size:22px}
#smh-pdf-app .smh-pdf-tool[data-tool="tutor"]{display:none!important}

/* Clear click-to-place instructions for Edit PDF and Sign PDF */
#smh-pdf-operation{min-width:0;overflow:visible}
#smh-pdf-operation>p{max-width:100%;line-height:1.65;overflow-wrap:anywhere;color:#40556b}
#smh-pdf-operation label{display:block;margin:12px 0;font-weight:700;color:#243b53}
#smh-pdf-operation input[type="text"],
#smh-pdf-operation input[type="number"]{display:block;width:100%;max-width:560px;margin-top:6px;padding:11px 12px;border:1px solid #cbd8e3;border-radius:9px;box-sizing:border-box}
.smh-pdf-placement-help{margin:14px 0 8px;padding:12px 14px;border-left:4px solid #087f9b;background:#edf8fa;border-radius:8px;color:#164b60;font-size:13px;font-weight:700;line-height:1.5}
.smh-pdf-placement-wrap{position:relative;display:inline-block;max-width:100%;margin:8px 0 4px;padding:8px;background:#f3f7fa;border:1px solid #d6e1e9;border-radius:10px;line-height:0}
.smh-pdf-placement-wrap canvas{display:block;max-width:100%;height:auto;cursor:crosshair;background:#fff;box-shadow:0 2px 10px #102b401a}
.smh-pdf-placement-marker{position:absolute;width:18px;height:18px;border:3px solid #fff;border-radius:50%;background:#ef4444;box-shadow:0 0 0 2px #b91c1c;transform:translate(-50%,-50%);pointer-events:none;z-index:2}
.smh-pdf-placement-status{margin:5px 0 14px;color:#52677d;font-size:12px;font-weight:700}
#smh-pdf-operation .smh-pdf-primary{margin-top:16px}
@media(max-width:600px){
 #smh-pdf-operation{padding:14px!important}
 .smh-pdf-placement-wrap{width:100%;box-sizing:border-box}
 .smh-pdf-placement-wrap canvas{margin:auto}
}


.smh-pdf-word-modes{border:1px solid #d8e2e8;border-radius:12px;padding:12px 16px;margin:14px 0;display:grid;gap:10px}
.smh-pdf-word-modes label{display:flex;align-items:center;gap:9px;font-weight:600}
.smh-pdf-word-modes input{width:auto}


/* v3.2.1: improve AI Book Simplifier action-button contrast, including disabled state */
#smh-pdf-app #smh-pdf-explain,
#smh-pdf-app #smh-pdf-explain-all {
  color: #ffffff !important;
  background: #08758a !important;
  border: 2px solid #075f70 !important;
  opacity: 1 !important;
  text-shadow: none !important;
  font-weight: 800 !important;
  min-height: 44px;
}
#smh-pdf-app #smh-pdf-explain:disabled,
#smh-pdf-app #smh-pdf-explain-all:disabled {
  color: #173b52 !important;
  background: #e2eef1 !important;
  border: 2px solid #b7d0d7 !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}
#smh-pdf-app #smh-pdf-explain:not(:disabled):hover,
#smh-pdf-app #smh-pdf-explain-all:not(:disabled):hover {
  color: #ffffff !important;
  background: #075f70 !important;
}
