.math-page{color:#d5e2fb;padding:26px 0 70px}.math-page *{box-sizing:border-box}.math-page .math-workspace{background:#151f39;border:1px solid #344968;border-radius:26px;overflow:hidden;box-shadow:0 18px 55px #03091555}.math-page .workspace-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 28px;background:#101a32;border-bottom:1px solid #344968;font-size:12px;letter-spacing:.13em;font-weight:900;color:#acc9fc}.math-page .dots{display:inline-flex;gap:7px;margin-right:16px}.math-page .dots i{display:inline-block;width:11px;height:11px;border-radius:50%;background:#fc6f86}.math-page .dots i:nth-child(2){background:#f5bb51}.math-page .dots i:nth-child(3){background:#48cbaf}.math-page .free{color:#73f5d0;white-space:nowrap}.math-page .work-inner{padding:30px 38px 38px}.math-page .kicker{font-size:11px;font-weight:900;letter-spacing:.19em;color:#bea3ff;margin:0 0 14px}.math-page h1{font-size:clamp(32px,4.5vw,54px);line-height:1.13;letter-spacing:-.035em;color:#fff;margin:0 0 12px}.math-page .lead{max-width:890px;color:#bed2fa;line-height:1.72;margin:0 0 26px;font-size:17px}.math-page h2{font-size:clamp(23px,3vw,32px);line-height:1.3;color:#fff;margin:0 0 15px}.math-page h3{font-size:19px;color:#fff;margin:0 0 13px}.math-page .input-panel{background:#0e1932;border:1px solid #394d74;border-radius:20px;padding:25px}.math-page .inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:19px}.math-page label{display:block;font-weight:800;color:#f3f5ff;margin-bottom:10px}.math-page .field-control{width:100%;min-width:0;border-radius:13px;background:#09152c;border:1px solid #4a5e86;color:#fff;font:inherit;font-size:18px;padding:16px 17px;outline:none}.math-page .field-control:focus{border-color:#ad8cff;box-shadow:0 0 0 3px #a58bff33}.math-page .field-control::placeholder{color:#8298bc}.math-page .field-hint{font-size:12px;color:#9fb9df;margin-top:8px;line-height:1.55}.math-page .row-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:20px}.math-page button{font:inherit;cursor:pointer}.math-page .primary-action{border:0;border-radius:14px;padding:15px 22px;background:linear-gradient(100deg,#5769f6,#9339e9);font-weight:900;color:#fff;min-height:51px;box-shadow:0 12px 24px #3d2abb55}.math-page .secondary-action{border:1px solid #5b7297;border-radius:14px;padding:13px 18px;background:#202e50;font-weight:800;color:#fff;min-height:49px}.math-page button:hover{filter:brightness(1.08)}.math-page button:focus-visible{outline:3px solid #beafff;outline-offset:3px}.math-page .examples{margin-top:24px;padding-top:21px;border-top:1px solid #344968}.math-page .examples label{font-size:14px}.math-page .no-api{margin:20px 0 0;color:#a9c1e7;font-size:13px;line-height:1.7}.math-page .notice{margin-top:17px;background:#173a30;border:1px solid #477a6a;color:#d3ffeb;border-radius:13px;padding:13px 15px}.math-page .notice.is-error{background:#3b2029;border-color:#ad646e;color:#ffe1e6}.math-page [hidden]{display:none!important}.math-page #math-result{scroll-margin-top:90px;margin-top:34px;padding-top:28px;border-top:1px solid #405678}.math-page .step-head{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap}.math-page .verified{font-size:12px;font-weight:800;color:#a4ffda;background:#143c32;border:1px solid #467e69;padding:9px 12px;border-radius:999px}.math-page .formula{padding:18px;border:1px solid #4d6387;border-radius:16px;text-align:center;background:#0c1832;color:#fff;font-size:clamp(16px,2.2vw,23px);overflow-wrap:anywhere}.math-page .formula .prime{color:#d2bbff}.math-page .step-list{display:grid;gap:15px;margin-top:20px}.math-page .step-card{background:#101b35;border:1px solid #334d74;border-radius:17px;padding:20px}.math-page .step-tag{color:#c9b3ff;font-size:11px;font-weight:900;letter-spacing:.12em;margin-bottom:11px}.math-page .math-rows{display:grid;gap:8px}.math-page .ng-math-row{display:flex;gap:12px;align-items:flex-start;padding:11px 13px;border-radius:11px;background:#1a2847}.math-page .ng-math-label{color:#c5dcfa;font-weight:800;min-width:132px;flex:none}.math-page .ng-math-expression{font-size:16px;color:#fff;overflow-wrap:anywhere;min-width:0;white-space:pre-wrap}.math-page .final-card{background:#11372d;border:1px solid #36886e;border-radius:18px;padding:23px}.math-page .final-result{color:#fff;font-size:clamp(17px,2.5vw,24px);line-height:1.65;font-weight:800;overflow-wrap:anywhere;margin:13px 0}.math-page .verify-note{font-size:12px;color:#c3e8d8;line-height:1.6}.math-page .result-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.math-page .practice{margin-top:26px;border-radius:18px;padding:20px;border:1px solid #3d5176;background:#1a2643}.math-page .practice p{color:#bad0f1;line-height:1.6;margin:0 0 14px}.math-page #answer-feedback{color:#d2e4ff;line-height:1.6;font-size:14px;margin-top:12px}.math-page .reading{max-width:960px;margin:54px auto 0;color:#c4d3ec;line-height:1.85}.math-page .reading h2{margin-top:35px}.math-page .reading h3{margin-top:26px}.math-page .reading ul{padding-left:20px}.math-page .reading code{background:#1b2948;border:1px solid #40577c;padding:2px 6px;border-radius:6px;color:#e1d1ff}.math-page .reading .callout{border-left:4px solid #a38bff;background:#182744;border-radius:10px;padding:14px 18px;color:#dae7fd}.math-page details{padding:15px 18px;border-radius:13px;border:1px solid #334c73;background:#121f3b;margin:10px 0}.math-page summary{cursor:pointer;color:#fff;font-weight:800}.math-page details p{margin:10px 0 0}.math-page .related{margin-top:50px}.math-page .related-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.math-page .related a{border:1px solid #374c70;background:#17243c;border-radius:17px;padding:21px;text-decoration:none;color:#fff;display:flex;flex-direction:column;gap:10px;min-height:155px}.math-page .related a:hover{border-color:#9f86ff}.math-page .related a strong{font-size:18px}.math-page .related a span{color:#bdd0ed;font-size:13px;line-height:1.5}.math-page .related a em{font-style:normal;color:#cebaff;font-weight:800;margin-top:auto}.math-page .screenreader{position:absolute;width:1px;height:1px;clip:rect(0,0,0,0);overflow:hidden;white-space:nowrap}.math-page .answer-grid{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.math-page .answer-grid input{flex:1 1 250px}.math-page .small-muted{font-size:12px;color:#a7bad9}
@media(max-width:760px){.math-page{padding:15px 0 40px}.math-page .workspace-bar{font-size:9px;padding:13px 15px}.math-page .dots{margin-right:5px}.math-page .work-inner{padding:22px 15px}.math-page .input-panel{padding:16px}.math-page .inputs,.math-page .related-grid{grid-template-columns:1fr}.math-page .row-actions .primary-action{width:100%}.math-page .ng-math-row{display:block}.math-page .ng-math-label{display:block;margin-bottom:5px}.math-page .formula{font-size:16px}.math-page .related a{min-height:auto}.math-page .result-actions button{flex:1 1 100%}}
@media print{header,footer,.math-page .input-panel,.math-page .related,.math-page .reading,.math-page .practice,.math-page .result-actions{display:none!important}.math-page{color:#111;background:#fff}.math-page .math-workspace{border:0;background:#fff;box-shadow:none}.math-page .work-inner{padding:0}.math-page #math-result{display:block!important}.math-page h1,.math-page h2,.math-page h3,.math-page .step-card,.math-page .ng-math-expression,.math-page .final-result{color:#111}.math-page .step-card,.math-page .final-card,.math-page .ng-math-row,.math-page .formula{background:#fff;color:#111;border-color:#ccc}.math-page .kicker,.math-page .lead,.math-page .verified,.math-page .workspace-bar{display:none}.math-page #math-result{border:0}}

/* NextGad shared workspace-header visual parity (Valentine Experience Studio).
   Deliberately scoped to the Product Rule tool; avoids legacy .dots selector collisions. */
.math-page .workspace-bar{min-height:74px;padding:20px 32px;display:flex;align-items:center;justify-content:space-between;gap:18px;background:#101a32;border-bottom:1px solid #344968;font-size:15px;font-weight:900;line-height:1.3;letter-spacing:.145em;color:#afc8fa}
.math-page .workspace-label{display:flex;align-items:center;gap:22px;min-width:0}
.math-page .math-window-dots{display:inline-flex;align-items:center;flex:0 0 auto;gap:12px;margin:0;padding:0;border:0;background:none;box-shadow:none;line-height:1}
.math-page .math-window-dots i{display:block;width:15px;height:15px;border:0;border-radius:50%;padding:0;margin:0;background:#fc6f86;box-shadow:none}
.math-page .math-window-dots i:nth-child(2){background:#f5bb51}
.math-page .math-window-dots i:nth-child(3){background:#48cbaf}
.math-page .workspace-bar .free{font-size:14px;letter-spacing:.16em;font-weight:900;white-space:nowrap;color:#73f5d0}
@media(max-width:760px){.math-page .workspace-bar{min-height:64px;padding:16px 18px;font-size:11px;letter-spacing:.09em;gap:10px}.math-page .workspace-label{gap:10px}.math-page .math-window-dots{gap:6px}.math-page .math-window-dots i{width:10px;height:10px}.math-page .workspace-bar .free{font-size:10px;letter-spacing:.075em}}
@media(max-width:390px){.math-page .workspace-bar{font-size:9px;padding:14px 12px}.math-page .workspace-label{gap:8px}.math-page .workspace-bar .free{font-size:9px;letter-spacing:.02em}}


/* Pixel-aligned workspace header and introduction copied from the design tokens
   of /iphone-storage-cache-assistant/iphone-storage.css.
   Keep after older rules so their larger Valentine-style overrides cannot win. */
@media screen {
  .math-page .math-workspace {
    background:#151f39; border:1px solid #344669; border-radius:25px;
    overflow:hidden; box-shadow:none;
  }
  .math-page .workspace-bar {
    display:flex; align-items:center; justify-content:flex-start;
    gap:17px; min-height:0; height:auto;
    background:#0e1730; padding:15px 26px;
    border-bottom:1px solid #354569;
    color:#bdceee; letter-spacing:.13em;
    font-size:11px; line-height:normal; font-weight:800;
  }
  .math-page .math-window-dots {
    display:flex; gap:6px; flex:0 0 auto;
    align-items:center; padding:0; margin:0; border:0;
  }
  .math-page .math-window-dots i {
    display:block; width:10px; height:10px; border-radius:50%;
    margin:0; padding:0; background:#fa6a76; box-shadow:none;
  }
  .math-page .math-window-dots i:nth-child(2) {background:#f7bf59;}
  .math-page .math-window-dots i:nth-child(3) {background:#45caa6;}
  .math-page .work-inner {padding:31px;}
  .math-page .kicker {font-size:12px;letter-spacing:.15em;color:#bfa8ff;font-weight:850;margin:0 0 16px;}
  .math-page h1 {font-size:clamp(28px,3.3vw,40px);line-height:1.15;letter-spacing:-.03em;margin:0 0 12px;color:#f7f8ff;}
  .math-page .lead {max-width:none;font-size:16px;line-height:1.6;margin:0 0 25px;color:#bfd2f5;}
}
@media screen and (max-width:760px) {
  .math-page .workspace-bar {padding:15px 18px;gap:12px;font-size:10px;letter-spacing:.08em;}
  .math-page .work-inner {padding:22px 16px;}
  .math-page h1 {font-size:29px;}
}
@media screen and (max-width:390px) {
  .math-page .workspace-bar {padding:13px 14px;gap:9px;font-size:9px;}
}
